am 18c56287: Merge "Print files when dict file existence check is failed."

* commit '18c562871f8ce9e6b26a7a348ab48aa7f055d4f2':
  Print files when dict file existence check is failed.
main
Keisuke Kuroyanagi 2014-08-13 07:55:17 +00:00 committed by Android Git Automerger
commit 9d81934003
1 changed files with 8 additions and 0 deletions

View File

@ -67,6 +67,13 @@ public class UserHistoryDictionaryTests extends AndroidTestCase {
FileUtils.deleteFilteredFiles(dictFile.getParentFile(), filenameFilter);
}
private void printAllFiles(final File dir) {
Log.d(TAG, dir.getAbsolutePath());
for (final File file : dir.listFiles()) {
Log.d(TAG, " " + file.getName());
}
}
@Override
protected void setUp() throws Exception {
super.setUp();
@ -274,6 +281,7 @@ public class UserHistoryDictionaryTests extends AndroidTestCase {
try {
Log.d(TAG, dictFile +" is not existing. Wait "
+ WAIT_FOR_WRITING_FILE_IN_MILLISECONDS + " ms for writing.");
printAllFiles(dictFile.getParentFile());
Thread.sleep(WAIT_FOR_WRITING_FILE_IN_MILLISECONDS);
} catch (final InterruptedException e) {
Log.e(TAG, "Interrupted during waiting for writing the dict file.");