File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
opengrok-indexer/src/test/java/org/opengrok/indexer/index Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -333,16 +333,18 @@ public void testRemoveFileOnFileChange() throws Exception {
333
333
Project project = new Project ("mercurial" , "/mercurial" );
334
334
IndexDatabase idb = new IndexDatabase (project );
335
335
assertNotNull (idb );
336
- RemoveIndexChangeListener listener = new RemoveIndexChangeListener ("/mercurial/bar.txt" );
336
+ String path = "/mercurial/bar.txt" ;
337
+ RemoveIndexChangeListener listener = new RemoveIndexChangeListener (path );
337
338
idb .addIndexChangedListener (listener );
338
339
idb .update ();
339
340
Assert .assertEquals (5 , listener .filesToAdd .size ());
340
341
listener .reset ();
341
342
342
343
// Change a file so that it gets picked up by the indexer.
343
- // Thread.sleep(1100);
344
- File bar = new File (testrepo .getSourceRoot () + File .separator + "mercurial" ,
345
- "bar.txt" );
344
+ File historyFile = new File (env .getDataRootPath (),
345
+ TandemPath .join ("historycache" + path , ".gz" ));
346
+ Assert .assertTrue (String .format ("history cache for %s has to exist" , path ), historyFile .exists ());
347
+ File bar = new File (testrepo .getSourceRoot () + File .separator + "mercurial" ,"bar.txt" );
346
348
Assert .assertTrue (bar .exists ());
347
349
try (BufferedWriter bw = new BufferedWriter (new FileWriter (bar , true ))) {
348
350
bw .write ("foo\n " );
You can’t perform that action at this time.
0 commit comments