Skip to content

Commit 02feb77

Browse files
committed
added wait for history threads
1 parent b352faf commit 02feb77

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

core/src/test/java/org/sterl/spring/persistent_tasks/AbstractSpringTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,9 @@ public void beforeEach() throws Exception {
197197
public void afterEach() throws Exception {
198198
schedulerA.shutdownNow();
199199
schedulerB.shutdownNow();
200+
201+
awaitHistoryThreads();
202+
200203
triggerService.deleteAll();
201204
historyService.deleteAll();
202205
}

core/src/test/java/org/sterl/spring/persistent_tasks/task/TaskTransactionTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,10 @@ void testRequiresNewHasOwnTransaction(String task) {
156156

157157
// THEN
158158
asserts.awaitValue(task + "test");
159+
// AND
160+
awaitHistoryThreads();
159161
hibernateAsserts.assertTrxCount(3);
162+
// AND
160163
assertThat(personRepository.count()).isEqualTo(1);
161164
}
162165

0 commit comments

Comments
 (0)