Change-Id: I8ae443a69aab715a59f347a2de5a36b458a934f5
This commit is contained in:
Stephan Bergmann
2016-03-11 11:50:50 +01:00
parent feb480d780
commit b2d53cc003

View File

@@ -37,7 +37,7 @@ class TestWorkAt implements TestIWorkAt {
private Thread _sync_thread; private Thread _sync_thread;
private Thread _async_thread; private Thread _async_thread;
private boolean _passedAync = true; private boolean _passedAsync = true;
boolean _notified = false; boolean _notified = false;
public synchronized void syncCall() throws Throwable { public synchronized void syncCall() throws Throwable {
@@ -47,12 +47,12 @@ class TestWorkAt implements TestIWorkAt {
// defer the check until passedAsyncTest and assert here // defer the check until passedAsyncTest and assert here
assertEquals(MESSAGES, _async_counter); assertEquals(MESSAGES, _async_counter);
if(_async_counter != MESSAGES) if(_async_counter != MESSAGES)
_passedAync = false; _passedAsync = false;
if(_sync_thread == null) if(_sync_thread == null)
_sync_thread = Thread.currentThread(); _sync_thread = Thread.currentThread();
if(DEBUG) System.err.println("syncCall:" + _sync_counter + " " + _passedAync + " " + Thread.currentThread()); if(DEBUG) System.err.println("syncCall:" + _sync_counter + " " + _passedAsync + " " + Thread.currentThread());
} }
public synchronized void asyncCall() throws Throwable { public synchronized void asyncCall() throws Throwable {
@@ -81,7 +81,7 @@ class TestWorkAt implements TestIWorkAt {
public synchronized boolean passedAsyncTest() { public synchronized boolean passedAsyncTest() {
assertEquals(MESSAGES, _sync_counter); assertEquals(MESSAGES, _sync_counter);
assertTrue(_passedAync); assertTrue(_passedAsync);
return _passedAync && (_sync_counter == MESSAGES); return _passedAsync && (_sync_counter == MESSAGES);
} }
} }