Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -126,25 +126,31 @@ public void testSerializedRecovery() throws Exception {
// time
boolean ongoingRecovery = false;
int recoveries = 0;
String recoveryStartLine = null;
var pattern =
Pattern.compile(".*recovered \\d+ mutations creating \\d+ entries from \\d+ walogs.*");
for (String line : result.split("\n")) {
// ignore metadata and root tables
if (line.contains(SystemTables.METADATA.tableId().canonical())
|| line.contains(SystemTables.ROOT.tableId().canonical())) {
// ignore system tables
if (SystemTables.tableIds().stream()
.anyMatch(tableId -> line.contains(tableId.canonical()))) {
continue;
}
if (line.contains("recovering data from walogs")) {
assertFalse(ongoingRecovery, "Saw recovery start before previous recovery finished");
assertFalse(ongoingRecovery,
"Saw recovery start before previous recovery finished. Previous start: "
+ recoveryStartLine + ", new start: " + line);
ongoingRecovery = true;
recoveryStartLine = line;
recoveries++;
}
if (pattern.matcher(line).matches()) {
assertTrue(ongoingRecovery, "Saw recovery end without recovery start");
assertTrue(ongoingRecovery, "Saw recovery end without recovery start: " + line);
ongoingRecovery = false;
recoveryStartLine = null;
}
}
assertFalse(ongoingRecovery, "Expected no ongoing recovery at end of test");
assertFalse(ongoingRecovery,
"Expected no ongoing recovery at end of test. Last start: " + recoveryStartLine);
assertTrue(recoveries > 0, "Expected at least one recovery to have occurred");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -396,8 +396,8 @@ protected void testCreateWithKeyInProgress(FateStore<TestEnv> store, ServerConte
// After deletion, make sure we can create again with the same key
var fateId2 =
seedTransaction(store, TEST_FATE_OP, fateKey, new TestRepo(), true).orElseThrow();
txStore = store.reserve(fateId);
assertEquals(fateId, fateId2);
txStore = store.reserve(fateId2);
assertTrue(txStore.timeCreated() > 0);
assertEquals(TStatus.SUBMITTED, txStore.getStatus());
} finally {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,10 +256,6 @@ public void testDeletingClonedTablePersistsFiles() throws Exception {
assertEquals(4, ample.stream().count());
}

// A GcCandidate for each tablet directory should exist until the shared references are
// compacted.
Wait.waitFor(() -> countGcCandidates(sourceTableId, 4), GC_MAX_WAIT, POLLING_WAIT);

client.tableOperations().compact(cloneTable, new CompactionConfig().setWait(true));

Wait.waitFor(() -> !fs.exists(sourceDir), GC_MAX_WAIT, POLLING_WAIT,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

import static org.junit.jupiter.api.Assertions.assertEquals;

import java.time.Duration;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
Expand Down Expand Up @@ -77,6 +78,11 @@ public void configure(MiniAccumuloConfigImpl cfg, Configuration hadoopCoreSite)
cfg.setMemory(ServerType.TABLET_SERVER, 1, MemoryUnit.GIGABYTE);
}

@Override
protected Duration defaultTimeout() {
return Duration.ofMinutes(20);
}

@SuppressFBWarnings(value = {"PREDICTABLE_RANDOM", "DMI_RANDOM_USED_ONLY_ONCE"},
justification = "predictable random is ok for testing")
@Test
Expand Down