fix blinking test

This commit is contained in:
Dmitry Batrak
2014-08-15 15:47:43 +04:00
parent 9538ab054b
commit 9e377a4313
@@ -554,4 +554,16 @@ public class DocumentCommitThread extends DocumentCommitProcessor implements Run
boolean isEnabled() {
return myEnabled;
}
@TestOnly
public void waitUntilAllCommitted() throws InterruptedException {
if (!myEnabled) {
throw new IllegalStateException("DocumentCommitThread is disabled");
}
synchronized (documentsToCommit) {
while(!documentsToCommit.isEmpty()) {
documentsToCommit.wait();
}
}
}
}