Merge branch 'use-synchroniser-for-mock-tests' into 'master'

Use Synchroniser for all mock tests

See merge request briar/briar!1550
This commit is contained in:
Torsten Grote
2021-11-18 13:37:16 +00:00
12 changed files with 25 additions and 79 deletions

View File

@@ -1,12 +1,17 @@
package org.briarproject.bramble.test;
import org.jmock.Mockery;
import org.jmock.lib.concurrent.Synchroniser;
import org.junit.After;
public abstract class BrambleMockTestCase extends BrambleTestCase {
protected final Mockery context = new Mockery();
public BrambleMockTestCase() {
context.setThreadingPolicy(new Synchroniser());
}
@After
public void checkExpectations() {
context.assertIsSatisfied();