Added timeout to wait.

This commit is contained in:
Winston Li 2014-11-16 22:04:18 +00:00
parent ccf17f9867
commit 38cf9e33c6
2 changed files with 4 additions and 1 deletions

View file

@ -67,6 +67,7 @@ public class WLDirectoryNodeSnapshot implements CandidateSnapshot {
@Override
public void approveWithVersionID(int versionID) {
System.out.println("approve with version " + versionID);
callback.approveSnapshot(versionID, this);
}

View file

@ -57,11 +57,13 @@ public class WriteLatexAPI implements WriteLatexDataSource {
public void expectPostback(String projectName) {
Object value = new Object();
postbackConds.put(projectName, value);
System.out.println("sleeping");
try {
value.wait();
value.wait(5000);
} catch (InterruptedException e) {
e.printStackTrace();
}
System.out.println("finished sleep");
}
/* Called by postback thread. */