Skip to content

Commit

Permalink
fix transactions tests
Browse files Browse the repository at this point in the history
  • Loading branch information
simkam committed Nov 1, 2018
1 parent 21e317b commit 498d06e
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ public void startServer() throws IOException, CommandFailedException {
.build());
offlineClient.apply(CONFIGURATION_BACKUP.backup());
controller.start(ManualTests.ARQUILLIAN_CONTAINER);

if (onlineClient.version().greaterThanOrEqualTo(ServerVersion.VERSION_5_0_0)) {
ops.undefineAttribute(TEST_TRANSACTIONS_ADDRESS, "use-jdbc-store");
}
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ public void startServer() throws IOException, CommandFailedException {

@Test
@InSequence(2)
public void resetStoreSetting() throws Exception {
if (onlineClient.version().greaterThanOrEqualTo(ServerVersion.VERSION_5_0_0)) {
ops.undefineAttribute(TEST_TRANSACTIONS_ADDRESS, "use-journal-store");
}
}

@Test
@InSequence(3)
public void changeAll() throws Exception {
assumeTrue(onlineClient.version().greaterThanOrEqualTo(ServerVersion.VERSION_1_5_0));
assumeFalse(onlineClient.version().equals(ServerVersion.VERSION_3_0_0));
Expand Down Expand Up @@ -109,7 +117,7 @@ public void changeAll() throws Exception {
}

@Test
@InSequence(3)
@InSequence(4)
public void stopServer() throws CommandFailedException, IOException {
controller.stop(ManualTests.ARQUILLIAN_CONTAINER);
offlineClient.apply(CONFIGURATION_BACKUP.restore());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,16 @@ public void enableJournalStore() throws Exception {

@Test
@InSequence(3)
public void resetStoreSetting() throws Exception {
if (onlineClient.version().greaterThanOrEqualTo(ServerVersion.VERSION_5_0_0)) {
ops.undefineAttribute(TRANSACTIONS_ADDRESS, "use-journal-store");
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 +100,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 Down

0 comments on commit 498d06e

Please sign in to comment.