From d21304e771c25b05c07c902f059c5055f1b6050d Mon Sep 17 00:00:00 2001 From: Ken Stevens Date: Wed, 17 Jul 2019 13:28:17 -0400 Subject: [PATCH] cleanup --- .../java/ca/uhn/fhir/jpa/dao/expunge/ExpungeHookTest.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/expunge/ExpungeHookTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/expunge/ExpungeHookTest.java index 3d5f722e291..5c019aded13 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/expunge/ExpungeHookTest.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/expunge/ExpungeHookTest.java @@ -59,13 +59,19 @@ public class ExpungeHookTest { public void expungeEverythingHook() throws InterruptedException { IIdType id = myPatientDao.create(new Patient()).getId(); assertNotNull(myPatientDao.read(id)); + myEverythingLatch.setExpectedCount(1); ExpungeOptions options = new ExpungeOptions(); options.setExpungeEverything(true); myExpungeService.expunge(null, null, null, options, null); myEverythingLatch.awaitExpected(); + + assertPatientGone(id); + } + + private void assertPatientGone(IIdType theId) { try { - myPatientDao.read(id); + myPatientDao.read(theId); fail(); } catch (ResourceNotFoundException e) { assertThat(e.getMessage(), containsString("is not known"));