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 @@ -76,7 +76,7 @@ private int findLeaderIndex(final List<ServerWrapper> servers) {
@Test
@Timeout(value = 10, unit = TimeUnit.MINUTES)
@DisplayName("Test leader failover: kill leader, verify new election and data consistency")
void testLeaderFailover() throws InterruptedException {
void leaderFailover() throws Exception {
logger.info("Creating 3-node Raft HA cluster with majority quorum");
final GenericContainer<?> arcade0 = createArcadeContainer("arcadedb-0", SERVER_LIST, "majority", network);
final GenericContainer<?> arcade1 = createArcadeContainer("arcadedb-1", SERVER_LIST, "majority", network);
Expand Down Expand Up @@ -181,7 +181,7 @@ void testLeaderFailover() throws InterruptedException {
@Test
@Timeout(value = 10, unit = TimeUnit.MINUTES)
@DisplayName("Test repeated leader failures: verify cluster stability under continuous failover")
void testRepeatedLeaderFailures() throws InterruptedException {
void repeatedLeaderFailures() throws Exception {
logger.info("Creating 3-node Raft HA cluster");
final GenericContainer<?> arcade0 = createArcadeContainer("arcadedb-0", SERVER_LIST, "majority", network);
final GenericContainer<?> arcade1 = createArcadeContainer("arcadedb-1", SERVER_LIST, "majority", network);
Expand Down Expand Up @@ -317,7 +317,7 @@ void testRepeatedLeaderFailures() throws InterruptedException {
@Test
@Timeout(value = 10, unit = TimeUnit.MINUTES)
@DisplayName("Test leader failover with active writes: verify no data loss during failover")
void testLeaderFailoverDuringWrites() throws InterruptedException {
void leaderFailoverDuringWrites() throws Exception {
logger.info("Creating 3-node Raft HA cluster");
final GenericContainer<?> arcade0 = createArcadeContainer("arcadedb-0", SERVER_LIST, "majority", network);
final GenericContainer<?> arcade1 = createArcadeContainer("arcadedb-1", SERVER_LIST, "majority", network);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ void threeNodeReplication() {
@Test
@Timeout(value = 10, unit = TimeUnit.MINUTES)
@DisplayName("Three-node Raft HA: replication across all nodes with consistency check")
void threeNodeReplicationMulti() throws InterruptedException {
void threeNodeReplicationMulti() throws Exception {
createArcadeContainer("arcadedb-0", SERVER_LIST, "majority", network);
createArcadeContainer("arcadedb-1", SERVER_LIST, "majority", network);
createArcadeContainer("arcadedb-2", SERVER_LIST, "majority", network);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
import org.junit.jupiter.api.Timeout;
import org.testcontainers.junit.jupiter.Testcontainers;

import java.io.IOException;
import java.util.List;
import java.util.concurrent.TimeUnit;

Expand All @@ -41,7 +40,7 @@
* Toxiproxy intercepts the Raft gRPC consensus port (2434) to inject faults.
*/
@Testcontainers
public class NetworkDelayIT extends ContainersTestTemplate {
class NetworkDelayIT extends ContainersTestTemplate {

// Proxy ports for Raft (consensus) traffic per node
private static final int RAFT_PROXY_PORT_0 = 8660;
Expand All @@ -65,7 +64,7 @@ public class NetworkDelayIT extends ContainersTestTemplate {
@Test
@Timeout(value = 10, unit = TimeUnit.MINUTES)
@DisplayName("Test symmetric network delay: all nodes experience same latency")
void testSymmetricDelay() throws IOException {
void symmetricDelay() throws Exception {
logger.info("Creating Raft and HTTP proxies for 3-node cluster");
final Proxy raftProxy0 = toxiproxyClient.createProxy("raftProxy0", "0.0.0.0:" + RAFT_PROXY_PORT_0, "arcadedb-0:2434");
final Proxy raftProxy1 = toxiproxyClient.createProxy("raftProxy1", "0.0.0.0:" + RAFT_PROXY_PORT_1, "arcadedb-1:2434");
Expand Down Expand Up @@ -144,7 +143,7 @@ void testSymmetricDelay() throws IOException {
@Test
@Timeout(value = 10, unit = TimeUnit.MINUTES)
@DisplayName("Test asymmetric delay: leader has higher latency than followers")
void testAsymmetricLeaderDelay() throws IOException, InterruptedException {
void asymmetricLeaderDelay() throws Exception {
logger.info("Creating Raft and HTTP proxies for 3-node cluster");
final Proxy raftProxy0 = toxiproxyClient.createProxy("raftProxy0", "0.0.0.0:" + RAFT_PROXY_PORT_0, "arcadedb-0:2434");
toxiproxyClient.createProxy("raftProxy1", "0.0.0.0:" + RAFT_PROXY_PORT_1, "arcadedb-1:2434");
Expand Down Expand Up @@ -219,7 +218,7 @@ void testAsymmetricLeaderDelay() throws IOException, InterruptedException {
@Test
@Timeout(value = 10, unit = TimeUnit.MINUTES)
@DisplayName("Test high latency with jitter: variable delays simulate unstable network")
void testHighLatencyWithJitter() throws IOException {
void highLatencyWithJitter() throws Exception {
logger.info("Creating Raft and HTTP proxies for 2-node cluster");
final Proxy raftProxy0 = toxiproxyClient.createProxy("raftProxy0", "0.0.0.0:" + RAFT_PROXY_PORT_0, "arcadedb-0:2434");
final Proxy raftProxy1 = toxiproxyClient.createProxy("raftProxy1", "0.0.0.0:" + RAFT_PROXY_PORT_1, "arcadedb-1:2434");
Expand Down Expand Up @@ -283,7 +282,7 @@ void testHighLatencyWithJitter() throws IOException {
@Test
@Timeout(value = 10, unit = TimeUnit.MINUTES)
@DisplayName("Test extreme latency: verify timeout handling")
void testExtremeLatency() throws IOException {
void extremeLatency() throws Exception {
logger.info("Creating Raft and HTTP proxies for 2-node cluster");
final Proxy raftProxy0 = toxiproxyClient.createProxy("raftProxy0", "0.0.0.0:" + RAFT_PROXY_PORT_0, "arcadedb-0:2434");
toxiproxyClient.createProxy("raftProxy1", "0.0.0.0:" + RAFT_PROXY_PORT_1, "arcadedb-1:2434");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ private int findLeaderIndex(final List<ServerWrapper> servers) {
@Test
@Timeout(value = 10, unit = TimeUnit.MINUTES)
@DisplayName("Test leader partition: isolate leader from cluster, verify new election in majority")
void testLeaderPartitionWithQuorum() throws InterruptedException {
void leaderPartitionWithQuorum() throws Exception {
logger.info("Creating 3-node Raft HA cluster with majority quorum (persistent for restart)");
final GenericContainer<?> arcade0 = createPersistentArcadeContainer("arcadedb-0", SERVER_LIST, "majority", network);
final GenericContainer<?> arcade1 = createPersistentArcadeContainer("arcadedb-1", SERVER_LIST, "majority", network);
Expand Down Expand Up @@ -197,7 +197,7 @@ void testLeaderPartitionWithQuorum() throws InterruptedException {
@Test
@Timeout(value = 10, unit = TimeUnit.MINUTES)
@DisplayName("Test single follower partition: one follower isolated, cluster continues")
void testSingleFollowerPartition() throws InterruptedException {
void singleFollowerPartition() throws Exception {
logger.info("Creating 3-node Raft HA cluster with majority quorum (persistent for restart)");
final GenericContainer<?> arcade0 = createPersistentArcadeContainer("arcadedb-0", SERVER_LIST, "majority", network);
final GenericContainer<?> arcade1 = createPersistentArcadeContainer("arcadedb-1", SERVER_LIST, "majority", network);
Expand Down Expand Up @@ -299,7 +299,7 @@ void testSingleFollowerPartition() throws InterruptedException {
@Test
@Timeout(value = 10, unit = TimeUnit.MINUTES)
@DisplayName("Test no-quorum partition: cluster cannot accept writes when quorum is lost")
void testNoQuorumScenario() throws Exception {
void noQuorumScenario() throws Exception {
logger.info("Creating 3-node Raft HA cluster with majority quorum (persistent for restart)");
final GenericContainer<?> arcade0 = createPersistentArcadeContainer("arcadedb-0", SERVER_LIST, "majority", network);
final GenericContainer<?> arcade1 = createPersistentArcadeContainer("arcadedb-1", SERVER_LIST, "majority", network);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ private int findLeaderIndex(final List<ServerWrapper> servers) {
@Test
@Timeout(value = 10, unit = TimeUnit.MINUTES)
@DisplayName("Test partition recovery: 2+1 split, heal partition, verify Raft log catch-up")
void testPartitionRecovery() throws InterruptedException {
void partitionRecovery() throws Exception {
logger.info("Creating 3-node Raft HA cluster with majority quorum (persistent for restart)");
final GenericContainer<?> arcade0 = createPersistentArcadeContainer("arcadedb-0", SERVER_LIST, "majority", network);
final GenericContainer<?> arcade1 = createPersistentArcadeContainer("arcadedb-1", SERVER_LIST, "majority", network);
Expand Down Expand Up @@ -185,7 +185,7 @@ void testPartitionRecovery() throws InterruptedException {
@Test
@Timeout(value = 10, unit = TimeUnit.MINUTES)
@DisplayName("Test multiple partition cycles: repeated split and heal with Raft log catch-up")
void testMultiplePartitionCycles() throws InterruptedException {
void multiplePartitionCycles() throws Exception {
logger.info("Creating 3-node Raft HA cluster (persistent for restart)");
final GenericContainer<?> arcade0 = createPersistentArcadeContainer("arcadedb-0", SERVER_LIST, "majority", network);
final GenericContainer<?> arcade1 = createPersistentArcadeContainer("arcadedb-1", SERVER_LIST, "majority", network);
Expand Down Expand Up @@ -281,7 +281,7 @@ void testMultiplePartitionCycles() throws InterruptedException {
@Test
@Timeout(value = 10, unit = TimeUnit.MINUTES)
@DisplayName("Test asymmetric partition recovery: follower isolated then resyncs")
void testAsymmetricPartitionRecovery() throws InterruptedException {
void asymmetricPartitionRecovery() throws Exception {
logger.info("Creating 3-node Raft HA cluster (persistent for restart)");
final GenericContainer<?> arcade0 = createPersistentArcadeContainer("arcadedb-0", SERVER_LIST, "majority", network);
final GenericContainer<?> arcade1 = createPersistentArcadeContainer("arcadedb-1", SERVER_LIST, "majority", network);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import org.junit.jupiter.api.Timeout;
import org.testcontainers.junit.jupiter.Testcontainers;

import java.io.IOException;
import java.util.List;
import java.util.concurrent.TimeUnit;

Expand All @@ -41,7 +40,7 @@
* Toxiproxy intercepts the Raft gRPC consensus port (2434) to inject faults.
*/
@Testcontainers
public class PacketLossIT extends ContainersTestTemplate {
class PacketLossIT extends ContainersTestTemplate {

// Proxy ports for Raft (consensus) traffic per node
private static final int RAFT_PROXY_PORT_0 = 8660;
Expand All @@ -65,7 +64,7 @@ public class PacketLossIT extends ContainersTestTemplate {
@Test
@Timeout(value = 10, unit = TimeUnit.MINUTES)
@DisplayName("Test low packet loss (5%): cluster should remain stable")
void testLowPacketLoss() throws IOException {
void lowPacketLoss() throws Exception {
logger.info("Creating Raft and HTTP proxies for 2-node cluster");
final Proxy raftProxy0 = toxiproxyClient.createProxy("raftProxy0", "0.0.0.0:" + RAFT_PROXY_PORT_0, "arcadedb-0:2434");
final Proxy raftProxy1 = toxiproxyClient.createProxy("raftProxy1", "0.0.0.0:" + RAFT_PROXY_PORT_1, "arcadedb-1:2434");
Expand Down Expand Up @@ -131,7 +130,7 @@ void testLowPacketLoss() throws IOException {
@Test
@Timeout(value = 10, unit = TimeUnit.MINUTES)
@DisplayName("Test moderate packet loss (20%): replication should succeed with retries")
void testModeratePacketLoss() throws IOException {
void moderatePacketLoss() throws Exception {
logger.info("Creating Raft and HTTP proxies for 2-node cluster");
final Proxy raftProxy0 = toxiproxyClient.createProxy("raftProxy0", "0.0.0.0:" + RAFT_PROXY_PORT_0, "arcadedb-0:2434");
final Proxy raftProxy1 = toxiproxyClient.createProxy("raftProxy1", "0.0.0.0:" + RAFT_PROXY_PORT_1, "arcadedb-1:2434");
Expand Down Expand Up @@ -195,7 +194,7 @@ void testModeratePacketLoss() throws IOException {
@Test
@Timeout(value = 10, unit = TimeUnit.MINUTES)
@DisplayName("Test high packet loss (50%): verify connection resilience")
void testHighPacketLoss() throws IOException {
void highPacketLoss() throws Exception {
logger.info("Creating Raft and HTTP proxies for 2-node cluster");
final Proxy raftProxy0 = toxiproxyClient.createProxy("raftProxy0", "0.0.0.0:" + RAFT_PROXY_PORT_0, "arcadedb-0:2434");
final Proxy raftProxy1 = toxiproxyClient.createProxy("raftProxy1", "0.0.0.0:" + RAFT_PROXY_PORT_1, "arcadedb-1:2434");
Expand Down Expand Up @@ -262,7 +261,7 @@ void testHighPacketLoss() throws IOException {
@Test
@Timeout(value = 10, unit = TimeUnit.MINUTES)
@DisplayName("Test directional packet loss: loss only in one direction")
void testDirectionalPacketLoss() throws IOException {
void directionalPacketLoss() throws Exception {
logger.info("Creating Raft and HTTP proxies for 3-node cluster");
final Proxy raftProxy0 = toxiproxyClient.createProxy("raftProxy0", "0.0.0.0:" + RAFT_PROXY_PORT_0, "arcadedb-0:2434");
toxiproxyClient.createProxy("raftProxy1", "0.0.0.0:" + RAFT_PROXY_PORT_1, "arcadedb-1:2434");
Expand Down Expand Up @@ -332,7 +331,7 @@ void testDirectionalPacketLoss() throws IOException {
@Test
@Timeout(value = 10, unit = TimeUnit.MINUTES)
@DisplayName("Test intermittent packet loss: verify recovery from transient issues")
void testIntermittentPacketLoss() throws IOException, InterruptedException {
void intermittentPacketLoss() throws Exception {
logger.info("Creating Raft and HTTP proxies for 2-node cluster");
final Proxy raftProxy0 = toxiproxyClient.createProxy("raftProxy0", "0.0.0.0:" + RAFT_PROXY_PORT_0, "arcadedb-0:2434");
toxiproxyClient.createProxy("raftProxy1", "0.0.0.0:" + RAFT_PROXY_PORT_1, "arcadedb-1:2434");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public void tearDown() {
@Test
@Timeout(value = 10, unit = TimeUnit.MINUTES)
@DisplayName("Rolling restart: restart each node sequentially, verify zero downtime")
void testRollingRestart() throws InterruptedException {
void rollingRestart() throws Exception {
logger.info("Creating 3-node Raft HA cluster with majority quorum");
final GenericContainer<?> arcade0 = createPersistentArcadeContainer("arcadedb-0", SERVER_LIST, "majority", network);
final GenericContainer<?> arcade1 = createPersistentArcadeContainer("arcadedb-1", SERVER_LIST, "majority", network);
Expand Down Expand Up @@ -287,7 +287,7 @@ void testRollingRestart() throws InterruptedException {
@Test
@Timeout(value = 10, unit = TimeUnit.MINUTES)
@DisplayName("Rapid rolling restart: minimal wait between restarts")
void testRapidRollingRestart() throws InterruptedException {
void rapidRollingRestart() throws Exception {
logger.info("Creating 3-node Raft HA cluster");
final GenericContainer<?> arcade0 = createPersistentArcadeContainer("arcadedb-0", SERVER_LIST, "majority", network);
final GenericContainer<?> arcade1 = createPersistentArcadeContainer("arcadedb-1", SERVER_LIST, "majority", network);
Expand Down Expand Up @@ -390,7 +390,7 @@ void testRapidRollingRestart() throws InterruptedException {
@Test
@Timeout(value = 10, unit = TimeUnit.MINUTES)
@DisplayName("Rolling restart with continuous writes: verify no data loss")
void testRollingRestartWithContinuousWrites() throws InterruptedException {
void rollingRestartWithContinuousWrites() throws Exception {
logger.info("Creating 3-node Raft HA cluster");
final GenericContainer<?> arcade0 = createPersistentArcadeContainer("arcadedb-0", SERVER_LIST, "majority", network);
final GenericContainer<?> arcade1 = createPersistentArcadeContainer("arcadedb-1", SERVER_LIST, "majority", network);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class SimpleHaScenarioIT extends ContainersTestTemplate {

@Test
@DisplayName("Two-node Raft HA: schema and data replication")
void twoNodeRaftReplication() throws InterruptedException {
void twoNodeRaftReplication() throws Exception {
createArcadeContainer("arcadedb-0", SERVER_LIST, "majority", network);
createArcadeContainer("arcadedb-1", SERVER_LIST, "majority", network);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ private int findLeaderIndex(final List<ServerWrapper> servers) {
@Test
@Timeout(value = 10, unit = TimeUnit.MINUTES)
@DisplayName("Test split-brain prevention: verify minority partition cannot accept writes (Raft leader steps down)")
void testSplitBrainPrevention() throws Exception {
void splitBrainPrevention() throws Exception {
logger.info("Creating 3-node Raft HA cluster with majority quorum (persistent for restart)");
final GenericContainer<?> arcade0 = createPersistentArcadeContainer("arcadedb-0", SERVER_LIST, "majority", network);
final GenericContainer<?> arcade1 = createPersistentArcadeContainer("arcadedb-1", SERVER_LIST, "majority", network);
Expand Down Expand Up @@ -207,7 +207,7 @@ void testSplitBrainPrevention() throws Exception {
@Test
@Timeout(value = 10, unit = TimeUnit.MINUTES)
@DisplayName("Test 1+1+1 partition: verify no writes possible without majority (all leaders step down)")
void testCompletePartitionNoQuorum() throws Exception {
void completePartitionNoQuorum() throws Exception {
logger.info("Creating 3-node Raft HA cluster with majority quorum (persistent for restart)");
final GenericContainer<?> arcade0 = createPersistentArcadeContainer("arcadedb-0", SERVER_LIST, "majority", network);
final GenericContainer<?> arcade1 = createPersistentArcadeContainer("arcadedb-1", SERVER_LIST, "majority", network);
Expand Down Expand Up @@ -329,7 +329,7 @@ void testCompletePartitionNoQuorum() throws Exception {
@Test
@Timeout(value = 10, unit = TimeUnit.MINUTES)
@DisplayName("Test cluster reformation: verify proper Raft leader election after partition healing")
void testClusterReformation() throws Exception {
void clusterReformation() throws Exception {
logger.info("Creating 3-node Raft HA cluster (persistent for restart)");
final GenericContainer<?> arcade0 = createPersistentArcadeContainer("arcadedb-0", SERVER_LIST, "majority", network);
final GenericContainer<?> arcade1 = createPersistentArcadeContainer("arcadedb-1", SERVER_LIST, "majority", network);
Expand Down Expand Up @@ -436,7 +436,7 @@ void testClusterReformation() throws Exception {
@Test
@Timeout(value = 10, unit = TimeUnit.MINUTES)
@DisplayName("Test quorum loss recovery: verify cluster recovers after temporary quorum loss")
void testQuorumLossRecovery() throws Exception {
void quorumLossRecovery() throws Exception {
logger.info("Creating 3-node Raft HA cluster with majority quorum (2/3) (persistent for restart)");
final GenericContainer<?> arcade0 = createPersistentArcadeContainer("arcadedb-0", SERVER_LIST, "majority", network);
final GenericContainer<?> arcade1 = createPersistentArcadeContainer("arcadedb-1", SERVER_LIST, "majority", network);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ protected void beginTest() {
}

@Test
void testPartialReplayAppliesRemainingPages() throws Exception {
void partialReplayAppliesRemainingPages() throws Exception {
final DatabaseInternal db = (DatabaseInternal) database;

// Insert records to ensure we have pages with known versions
Expand Down
Loading
Loading