Skip to content

Commit

Permalink
JournalStoreVsJdbcStoreOnlineTest fix
Browse files Browse the repository at this point in the history
Fix for issue: #166

Use-journal-store and use-jdbc-store attributes must be set exclusively and server must be restarted for avoiding this conflict
  • Loading branch information
jcibik authored and msve committed Nov 25, 2019
1 parent 733b2e5 commit 95ea576
Showing 1 changed file with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,23 @@ public void enableJournalStore() throws Exception {
result = ops.readAttribute(TRANSACTIONS_ADDRESS, "use-jdbc-store");
result.assertSuccess();
assertFalse(result.booleanValue());

onlineClient.apply(TransactionManager.basicAttributes().useJournalStore(false).build());

result = ops.readAttribute(TRANSACTIONS_ADDRESS, journalStoreAttribute());
result.assertSuccess();
assertFalse(result.booleanValue());
}

@Test
@InSequence(3)
public void reloadServer() throws CommandFailedException, IOException {
controller.stop(ManualTests.ARQUILLIAN_CONTAINER);
controller.start(ManualTests.ARQUILLIAN_CONTAINER);
}

@Test
@InSequence(4)
public void enableJdbcStore() throws Exception {
assumeTrue(onlineClient.version().greaterThanOrEqualTo(ServerVersion.VERSION_1_5_0));
assumeFalse(onlineClient.version().equals(ServerVersion.VERSION_3_0_0));
Expand All @@ -90,7 +103,7 @@ public void enableJdbcStore() throws Exception {
}

@Test
@InSequence(4)
@InSequence(5)
public void stopServer() throws CommandFailedException, IOException {
controller.stop(ManualTests.ARQUILLIAN_CONTAINER);
offlineClient.apply(CONFIGURATION_BACKUP.restore());
Expand All @@ -100,3 +113,4 @@ private String journalStoreAttribute() throws IOException {
return onlineClient.version().lessThan(ServerVersion.VERSION_4_0_0) ? "use-hornetq-store" : "use-journal-store";
}
}

0 comments on commit 95ea576

Please sign in to comment.