Skip to content

Commit

Permalink
ARTEMIS-3297 Fixing Tests that do not support retention on the file s…
Browse files Browse the repository at this point in the history
…ystem
  • Loading branch information
clebertsuconic committed May 19, 2021
1 parent e06555b commit 5e622a6
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
Expand Up @@ -185,6 +185,9 @@ protected NodeManager createReplicatedBackupNodeManager(Configuration backupConf
return new InVMNodeManager(true, backupConfig.getJournalLocation());
}

protected boolean supportsRetention() {
return true;
}

protected void createReplicatedConfigs() throws Exception {
final TransportConfiguration liveConnector = getConnectorTransportConfiguration(true);
Expand All @@ -207,8 +210,10 @@ protected void createReplicatedConfigs() throws Exception {

liveServer = createTestableServer(liveConfig);

liveServer.getServer().getConfiguration().setJournalRetentionDirectory(getJournalDir(0, false) + "_retention");
backupServer.getServer().getConfiguration().setJournalRetentionDirectory(getJournalDir(0, true) + "_retention");
if (supportsRetention()) {
liveServer.getServer().getConfiguration().setJournalRetentionDirectory(getJournalDir(0, false) + "_retention");
backupServer.getServer().getConfiguration().setJournalRetentionDirectory(getJournalDir(0, true) + "_retention");
}
}

protected void setupHAPolicyConfiguration() {
Expand Down
Expand Up @@ -28,6 +28,11 @@ public class ReplicatedLargeMessageWithDelayFailoverTest extends ReplicatedLarge

private BackupSyncDelay syncDelay;

@Override
protected boolean supportsRetention() {
return false;
}

@Override
@Before
public void setUp() throws Exception {
Expand Down
Expand Up @@ -27,6 +27,11 @@ public class ReplicatedWithDelayFailoverTest extends ReplicatedFailoverTest {

private BackupSyncDelay syncDelay;

@Override
protected boolean supportsRetention() {
return false;
}

@Override
@Before
public void setUp() throws Exception {
Expand Down

0 comments on commit 5e622a6

Please sign in to comment.