Skip to content

Commit

Permalink
Increases wait time to make sure that JsonDumpFileProcessingTest.test…
Browse files Browse the repository at this point in the history
…Timeout works
  • Loading branch information
Tpt committed May 7, 2018
1 parent f458175 commit ac12811
Showing 1 changed file with 3 additions and 11 deletions.
Expand Up @@ -31,11 +31,9 @@
import org.junit.Test;
import org.wikidata.wdtk.datamodel.interfaces.EntityDocumentProcessor;
import org.wikidata.wdtk.datamodel.interfaces.ItemDocument;
import org.wikidata.wdtk.datamodel.interfaces.PropertyDocument;
import org.wikidata.wdtk.dumpfiles.wmf.WmfDumpFile;
import org.wikidata.wdtk.testing.MockDirectoryManager;
import org.wikidata.wdtk.testing.MockStringContentFactory;
import org.wikidata.wdtk.util.Timer;

public class JsonDumpFileProcessingTest {

Expand All @@ -53,15 +51,9 @@ private class SlowDocumentProcessor implements EntityDocumentProcessor {
public void processItemDocument(ItemDocument itemDocument) {
itemCount++;
if (itemCount == 1) {
Timer timer = Timer.getNamedTimer("delayTimer");
timer.start();
boolean busywait = true;
while (busywait) {
timer.stop();
if (timer.getTotalCpuTime() > 1000000000) {
busywait = false;
}
timer.start();
try {
Thread.sleep(2000);
} catch (InterruptedException e) {
}
}
}
Expand Down

0 comments on commit ac12811

Please sign in to comment.