await cleanup
This commit is contained in:
parent
f0b2bb8309
commit
028febfe45
|
@ -1,4 +1,5 @@
|
|||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
|
@ -116,12 +117,17 @@
|
|||
<artifactId>jackson-databind</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-test-utilities</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>hapi-fhir-test-utilities</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.awaitility</groupId>
|
||||
<artifactId>awaitility</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<pluginManagement>
|
||||
|
|
|
@ -6,6 +6,7 @@ import org.hl7.fhir.dstu3.model.Subscription;
|
|||
import org.junit.After;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import static org.awaitility.Awaitility.await;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
public abstract class BaseSubscriptionRegistryTest extends BaseSubscriptionDstu3Test {
|
||||
|
@ -21,7 +22,11 @@ public abstract class BaseSubscriptionRegistryTest extends BaseSubscriptionDstu3
|
|||
@After
|
||||
public void clearRegistryAfter() {
|
||||
mySubscriptionRegistry.unregisterAllSubscriptions();
|
||||
assertRegistrySize(0);
|
||||
await().until(this::registryEmpty);
|
||||
}
|
||||
|
||||
public boolean registryEmpty() {
|
||||
return mySubscriptionChannelRegistry.size() == 0;
|
||||
}
|
||||
|
||||
protected Subscription createSubscription() {
|
||||
|
|
Loading…
Reference in New Issue