Skip to content

Commit 6b9b6be

Browse files
authored
chore: cleanup tests classes (#3948)
1 parent f6afe41 commit 6b9b6be

54 files changed

Lines changed: 172 additions & 288 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

e2e-ha/src/test/java/com/arcadedb/containers/ha/LeaderFailoverIT.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ private int findLeaderIndex(final List<ServerWrapper> servers) {
7676
@Test
7777
@Timeout(value = 10, unit = TimeUnit.MINUTES)
7878
@DisplayName("Test leader failover: kill leader, verify new election and data consistency")
79-
void testLeaderFailover() throws InterruptedException {
79+
void leaderFailover() throws Exception {
8080
logger.info("Creating 3-node Raft HA cluster with majority quorum");
8181
final GenericContainer<?> arcade0 = createArcadeContainer("arcadedb-0", SERVER_LIST, "majority", network);
8282
final GenericContainer<?> arcade1 = createArcadeContainer("arcadedb-1", SERVER_LIST, "majority", network);
@@ -181,7 +181,7 @@ void testLeaderFailover() throws InterruptedException {
181181
@Test
182182
@Timeout(value = 10, unit = TimeUnit.MINUTES)
183183
@DisplayName("Test repeated leader failures: verify cluster stability under continuous failover")
184-
void testRepeatedLeaderFailures() throws InterruptedException {
184+
void repeatedLeaderFailures() throws Exception {
185185
logger.info("Creating 3-node Raft HA cluster");
186186
final GenericContainer<?> arcade0 = createArcadeContainer("arcadedb-0", SERVER_LIST, "majority", network);
187187
final GenericContainer<?> arcade1 = createArcadeContainer("arcadedb-1", SERVER_LIST, "majority", network);
@@ -317,7 +317,7 @@ void testRepeatedLeaderFailures() throws InterruptedException {
317317
@Test
318318
@Timeout(value = 10, unit = TimeUnit.MINUTES)
319319
@DisplayName("Test leader failover with active writes: verify no data loss during failover")
320-
void testLeaderFailoverDuringWrites() throws InterruptedException {
320+
void leaderFailoverDuringWrites() throws Exception {
321321
logger.info("Creating 3-node Raft HA cluster");
322322
final GenericContainer<?> arcade0 = createArcadeContainer("arcadedb-0", SERVER_LIST, "majority", network);
323323
final GenericContainer<?> arcade1 = createArcadeContainer("arcadedb-1", SERVER_LIST, "majority", network);

e2e-ha/src/test/java/com/arcadedb/containers/ha/LoadThreeInstancesScenarioIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ void threeNodeReplication() {
128128
@Test
129129
@Timeout(value = 10, unit = TimeUnit.MINUTES)
130130
@DisplayName("Three-node Raft HA: replication across all nodes with consistency check")
131-
void threeNodeReplicationMulti() throws InterruptedException {
131+
void threeNodeReplicationMulti() throws Exception {
132132
createArcadeContainer("arcadedb-0", SERVER_LIST, "majority", network);
133133
createArcadeContainer("arcadedb-1", SERVER_LIST, "majority", network);
134134
createArcadeContainer("arcadedb-2", SERVER_LIST, "majority", network);

e2e-ha/src/test/java/com/arcadedb/containers/ha/NetworkDelayIT.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
import org.junit.jupiter.api.Timeout;
3232
import org.testcontainers.junit.jupiter.Testcontainers;
3333

34-
import java.io.IOException;
3534
import java.util.List;
3635
import java.util.concurrent.TimeUnit;
3736

@@ -41,7 +40,7 @@
4140
* Toxiproxy intercepts the Raft gRPC consensus port (2434) to inject faults.
4241
*/
4342
@Testcontainers
44-
public class NetworkDelayIT extends ContainersTestTemplate {
43+
class NetworkDelayIT extends ContainersTestTemplate {
4544

4645
// Proxy ports for Raft (consensus) traffic per node
4746
private static final int RAFT_PROXY_PORT_0 = 8660;
@@ -65,7 +64,7 @@ public class NetworkDelayIT extends ContainersTestTemplate {
6564
@Test
6665
@Timeout(value = 10, unit = TimeUnit.MINUTES)
6766
@DisplayName("Test symmetric network delay: all nodes experience same latency")
68-
void testSymmetricDelay() throws IOException {
67+
void symmetricDelay() throws Exception {
6968
logger.info("Creating Raft and HTTP proxies for 3-node cluster");
7069
final Proxy raftProxy0 = toxiproxyClient.createProxy("raftProxy0", "0.0.0.0:" + RAFT_PROXY_PORT_0, "arcadedb-0:2434");
7170
final Proxy raftProxy1 = toxiproxyClient.createProxy("raftProxy1", "0.0.0.0:" + RAFT_PROXY_PORT_1, "arcadedb-1:2434");
@@ -144,7 +143,7 @@ void testSymmetricDelay() throws IOException {
144143
@Test
145144
@Timeout(value = 10, unit = TimeUnit.MINUTES)
146145
@DisplayName("Test asymmetric delay: leader has higher latency than followers")
147-
void testAsymmetricLeaderDelay() throws IOException, InterruptedException {
146+
void asymmetricLeaderDelay() throws Exception {
148147
logger.info("Creating Raft and HTTP proxies for 3-node cluster");
149148
final Proxy raftProxy0 = toxiproxyClient.createProxy("raftProxy0", "0.0.0.0:" + RAFT_PROXY_PORT_0, "arcadedb-0:2434");
150149
toxiproxyClient.createProxy("raftProxy1", "0.0.0.0:" + RAFT_PROXY_PORT_1, "arcadedb-1:2434");
@@ -219,7 +218,7 @@ void testAsymmetricLeaderDelay() throws IOException, InterruptedException {
219218
@Test
220219
@Timeout(value = 10, unit = TimeUnit.MINUTES)
221220
@DisplayName("Test high latency with jitter: variable delays simulate unstable network")
222-
void testHighLatencyWithJitter() throws IOException {
221+
void highLatencyWithJitter() throws Exception {
223222
logger.info("Creating Raft and HTTP proxies for 2-node cluster");
224223
final Proxy raftProxy0 = toxiproxyClient.createProxy("raftProxy0", "0.0.0.0:" + RAFT_PROXY_PORT_0, "arcadedb-0:2434");
225224
final Proxy raftProxy1 = toxiproxyClient.createProxy("raftProxy1", "0.0.0.0:" + RAFT_PROXY_PORT_1, "arcadedb-1:2434");
@@ -283,7 +282,7 @@ void testHighLatencyWithJitter() throws IOException {
283282
@Test
284283
@Timeout(value = 10, unit = TimeUnit.MINUTES)
285284
@DisplayName("Test extreme latency: verify timeout handling")
286-
void testExtremeLatency() throws IOException {
285+
void extremeLatency() throws Exception {
287286
logger.info("Creating Raft and HTTP proxies for 2-node cluster");
288287
final Proxy raftProxy0 = toxiproxyClient.createProxy("raftProxy0", "0.0.0.0:" + RAFT_PROXY_PORT_0, "arcadedb-0:2434");
289288
toxiproxyClient.createProxy("raftProxy1", "0.0.0.0:" + RAFT_PROXY_PORT_1, "arcadedb-1:2434");

e2e-ha/src/test/java/com/arcadedb/containers/ha/NetworkPartitionIT.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ private int findLeaderIndex(final List<ServerWrapper> servers) {
7979
@Test
8080
@Timeout(value = 10, unit = TimeUnit.MINUTES)
8181
@DisplayName("Test leader partition: isolate leader from cluster, verify new election in majority")
82-
void testLeaderPartitionWithQuorum() throws InterruptedException {
82+
void leaderPartitionWithQuorum() throws Exception {
8383
logger.info("Creating 3-node Raft HA cluster with majority quorum (persistent for restart)");
8484
final GenericContainer<?> arcade0 = createPersistentArcadeContainer("arcadedb-0", SERVER_LIST, "majority", network);
8585
final GenericContainer<?> arcade1 = createPersistentArcadeContainer("arcadedb-1", SERVER_LIST, "majority", network);
@@ -197,7 +197,7 @@ void testLeaderPartitionWithQuorum() throws InterruptedException {
197197
@Test
198198
@Timeout(value = 10, unit = TimeUnit.MINUTES)
199199
@DisplayName("Test single follower partition: one follower isolated, cluster continues")
200-
void testSingleFollowerPartition() throws InterruptedException {
200+
void singleFollowerPartition() throws Exception {
201201
logger.info("Creating 3-node Raft HA cluster with majority quorum (persistent for restart)");
202202
final GenericContainer<?> arcade0 = createPersistentArcadeContainer("arcadedb-0", SERVER_LIST, "majority", network);
203203
final GenericContainer<?> arcade1 = createPersistentArcadeContainer("arcadedb-1", SERVER_LIST, "majority", network);
@@ -299,7 +299,7 @@ void testSingleFollowerPartition() throws InterruptedException {
299299
@Test
300300
@Timeout(value = 10, unit = TimeUnit.MINUTES)
301301
@DisplayName("Test no-quorum partition: cluster cannot accept writes when quorum is lost")
302-
void testNoQuorumScenario() throws Exception {
302+
void noQuorumScenario() throws Exception {
303303
logger.info("Creating 3-node Raft HA cluster with majority quorum (persistent for restart)");
304304
final GenericContainer<?> arcade0 = createPersistentArcadeContainer("arcadedb-0", SERVER_LIST, "majority", network);
305305
final GenericContainer<?> arcade1 = createPersistentArcadeContainer("arcadedb-1", SERVER_LIST, "majority", network);

e2e-ha/src/test/java/com/arcadedb/containers/ha/NetworkPartitionRecoveryIT.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ private int findLeaderIndex(final List<ServerWrapper> servers) {
8080
@Test
8181
@Timeout(value = 10, unit = TimeUnit.MINUTES)
8282
@DisplayName("Test partition recovery: 2+1 split, heal partition, verify Raft log catch-up")
83-
void testPartitionRecovery() throws InterruptedException {
83+
void partitionRecovery() throws Exception {
8484
logger.info("Creating 3-node Raft HA cluster with majority quorum (persistent for restart)");
8585
final GenericContainer<?> arcade0 = createPersistentArcadeContainer("arcadedb-0", SERVER_LIST, "majority", network);
8686
final GenericContainer<?> arcade1 = createPersistentArcadeContainer("arcadedb-1", SERVER_LIST, "majority", network);
@@ -185,7 +185,7 @@ void testPartitionRecovery() throws InterruptedException {
185185
@Test
186186
@Timeout(value = 10, unit = TimeUnit.MINUTES)
187187
@DisplayName("Test multiple partition cycles: repeated split and heal with Raft log catch-up")
188-
void testMultiplePartitionCycles() throws InterruptedException {
188+
void multiplePartitionCycles() throws Exception {
189189
logger.info("Creating 3-node Raft HA cluster (persistent for restart)");
190190
final GenericContainer<?> arcade0 = createPersistentArcadeContainer("arcadedb-0", SERVER_LIST, "majority", network);
191191
final GenericContainer<?> arcade1 = createPersistentArcadeContainer("arcadedb-1", SERVER_LIST, "majority", network);
@@ -281,7 +281,7 @@ void testMultiplePartitionCycles() throws InterruptedException {
281281
@Test
282282
@Timeout(value = 10, unit = TimeUnit.MINUTES)
283283
@DisplayName("Test asymmetric partition recovery: follower isolated then resyncs")
284-
void testAsymmetricPartitionRecovery() throws InterruptedException {
284+
void asymmetricPartitionRecovery() throws Exception {
285285
logger.info("Creating 3-node Raft HA cluster (persistent for restart)");
286286
final GenericContainer<?> arcade0 = createPersistentArcadeContainer("arcadedb-0", SERVER_LIST, "majority", network);
287287
final GenericContainer<?> arcade1 = createPersistentArcadeContainer("arcadedb-1", SERVER_LIST, "majority", network);

e2e-ha/src/test/java/com/arcadedb/containers/ha/PacketLossIT.java

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
import org.junit.jupiter.api.Timeout;
3030
import org.testcontainers.junit.jupiter.Testcontainers;
3131

32-
import java.io.IOException;
3332
import java.util.List;
3433
import java.util.concurrent.TimeUnit;
3534

@@ -41,7 +40,7 @@
4140
* Toxiproxy intercepts the Raft gRPC consensus port (2434) to inject faults.
4241
*/
4342
@Testcontainers
44-
public class PacketLossIT extends ContainersTestTemplate {
43+
class PacketLossIT extends ContainersTestTemplate {
4544

4645
// Proxy ports for Raft (consensus) traffic per node
4746
private static final int RAFT_PROXY_PORT_0 = 8660;
@@ -65,7 +64,7 @@ public class PacketLossIT extends ContainersTestTemplate {
6564
@Test
6665
@Timeout(value = 10, unit = TimeUnit.MINUTES)
6766
@DisplayName("Test low packet loss (5%): cluster should remain stable")
68-
void testLowPacketLoss() throws IOException {
67+
void lowPacketLoss() throws Exception {
6968
logger.info("Creating Raft and HTTP proxies for 2-node cluster");
7069
final Proxy raftProxy0 = toxiproxyClient.createProxy("raftProxy0", "0.0.0.0:" + RAFT_PROXY_PORT_0, "arcadedb-0:2434");
7170
final Proxy raftProxy1 = toxiproxyClient.createProxy("raftProxy1", "0.0.0.0:" + RAFT_PROXY_PORT_1, "arcadedb-1:2434");
@@ -131,7 +130,7 @@ void testLowPacketLoss() throws IOException {
131130
@Test
132131
@Timeout(value = 10, unit = TimeUnit.MINUTES)
133132
@DisplayName("Test moderate packet loss (20%): replication should succeed with retries")
134-
void testModeratePacketLoss() throws IOException {
133+
void moderatePacketLoss() throws Exception {
135134
logger.info("Creating Raft and HTTP proxies for 2-node cluster");
136135
final Proxy raftProxy0 = toxiproxyClient.createProxy("raftProxy0", "0.0.0.0:" + RAFT_PROXY_PORT_0, "arcadedb-0:2434");
137136
final Proxy raftProxy1 = toxiproxyClient.createProxy("raftProxy1", "0.0.0.0:" + RAFT_PROXY_PORT_1, "arcadedb-1:2434");
@@ -195,7 +194,7 @@ void testModeratePacketLoss() throws IOException {
195194
@Test
196195
@Timeout(value = 10, unit = TimeUnit.MINUTES)
197196
@DisplayName("Test high packet loss (50%): verify connection resilience")
198-
void testHighPacketLoss() throws IOException {
197+
void highPacketLoss() throws Exception {
199198
logger.info("Creating Raft and HTTP proxies for 2-node cluster");
200199
final Proxy raftProxy0 = toxiproxyClient.createProxy("raftProxy0", "0.0.0.0:" + RAFT_PROXY_PORT_0, "arcadedb-0:2434");
201200
final Proxy raftProxy1 = toxiproxyClient.createProxy("raftProxy1", "0.0.0.0:" + RAFT_PROXY_PORT_1, "arcadedb-1:2434");
@@ -262,7 +261,7 @@ void testHighPacketLoss() throws IOException {
262261
@Test
263262
@Timeout(value = 10, unit = TimeUnit.MINUTES)
264263
@DisplayName("Test directional packet loss: loss only in one direction")
265-
void testDirectionalPacketLoss() throws IOException {
264+
void directionalPacketLoss() throws Exception {
266265
logger.info("Creating Raft and HTTP proxies for 3-node cluster");
267266
final Proxy raftProxy0 = toxiproxyClient.createProxy("raftProxy0", "0.0.0.0:" + RAFT_PROXY_PORT_0, "arcadedb-0:2434");
268267
toxiproxyClient.createProxy("raftProxy1", "0.0.0.0:" + RAFT_PROXY_PORT_1, "arcadedb-1:2434");
@@ -332,7 +331,7 @@ void testDirectionalPacketLoss() throws IOException {
332331
@Test
333332
@Timeout(value = 10, unit = TimeUnit.MINUTES)
334333
@DisplayName("Test intermittent packet loss: verify recovery from transient issues")
335-
void testIntermittentPacketLoss() throws IOException, InterruptedException {
334+
void intermittentPacketLoss() throws Exception {
336335
logger.info("Creating Raft and HTTP proxies for 2-node cluster");
337336
final Proxy raftProxy0 = toxiproxyClient.createProxy("raftProxy0", "0.0.0.0:" + RAFT_PROXY_PORT_0, "arcadedb-0:2434");
338337
toxiproxyClient.createProxy("raftProxy1", "0.0.0.0:" + RAFT_PROXY_PORT_1, "arcadedb-1:2434");

e2e-ha/src/test/java/com/arcadedb/containers/ha/RollingRestartIT.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public void tearDown() {
8383
@Test
8484
@Timeout(value = 10, unit = TimeUnit.MINUTES)
8585
@DisplayName("Rolling restart: restart each node sequentially, verify zero downtime")
86-
void testRollingRestart() throws InterruptedException {
86+
void rollingRestart() throws Exception {
8787
logger.info("Creating 3-node Raft HA cluster with majority quorum");
8888
final GenericContainer<?> arcade0 = createPersistentArcadeContainer("arcadedb-0", SERVER_LIST, "majority", network);
8989
final GenericContainer<?> arcade1 = createPersistentArcadeContainer("arcadedb-1", SERVER_LIST, "majority", network);
@@ -287,7 +287,7 @@ void testRollingRestart() throws InterruptedException {
287287
@Test
288288
@Timeout(value = 10, unit = TimeUnit.MINUTES)
289289
@DisplayName("Rapid rolling restart: minimal wait between restarts")
290-
void testRapidRollingRestart() throws InterruptedException {
290+
void rapidRollingRestart() throws Exception {
291291
logger.info("Creating 3-node Raft HA cluster");
292292
final GenericContainer<?> arcade0 = createPersistentArcadeContainer("arcadedb-0", SERVER_LIST, "majority", network);
293293
final GenericContainer<?> arcade1 = createPersistentArcadeContainer("arcadedb-1", SERVER_LIST, "majority", network);
@@ -390,7 +390,7 @@ void testRapidRollingRestart() throws InterruptedException {
390390
@Test
391391
@Timeout(value = 10, unit = TimeUnit.MINUTES)
392392
@DisplayName("Rolling restart with continuous writes: verify no data loss")
393-
void testRollingRestartWithContinuousWrites() throws InterruptedException {
393+
void rollingRestartWithContinuousWrites() throws Exception {
394394
logger.info("Creating 3-node Raft HA cluster");
395395
final GenericContainer<?> arcade0 = createPersistentArcadeContainer("arcadedb-0", SERVER_LIST, "majority", network);
396396
final GenericContainer<?> arcade1 = createPersistentArcadeContainer("arcadedb-1", SERVER_LIST, "majority", network);

e2e-ha/src/test/java/com/arcadedb/containers/ha/SimpleHaScenarioIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class SimpleHaScenarioIT extends ContainersTestTemplate {
3636

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

e2e-ha/src/test/java/com/arcadedb/containers/ha/SplitBrainIT.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ private int findLeaderIndex(final List<ServerWrapper> servers) {
8282
@Test
8383
@Timeout(value = 10, unit = TimeUnit.MINUTES)
8484
@DisplayName("Test split-brain prevention: verify minority partition cannot accept writes (Raft leader steps down)")
85-
void testSplitBrainPrevention() throws Exception {
85+
void splitBrainPrevention() throws Exception {
8686
logger.info("Creating 3-node Raft HA cluster with majority quorum (persistent for restart)");
8787
final GenericContainer<?> arcade0 = createPersistentArcadeContainer("arcadedb-0", SERVER_LIST, "majority", network);
8888
final GenericContainer<?> arcade1 = createPersistentArcadeContainer("arcadedb-1", SERVER_LIST, "majority", network);
@@ -207,7 +207,7 @@ void testSplitBrainPrevention() throws Exception {
207207
@Test
208208
@Timeout(value = 10, unit = TimeUnit.MINUTES)
209209
@DisplayName("Test 1+1+1 partition: verify no writes possible without majority (all leaders step down)")
210-
void testCompletePartitionNoQuorum() throws Exception {
210+
void completePartitionNoQuorum() throws Exception {
211211
logger.info("Creating 3-node Raft HA cluster with majority quorum (persistent for restart)");
212212
final GenericContainer<?> arcade0 = createPersistentArcadeContainer("arcadedb-0", SERVER_LIST, "majority", network);
213213
final GenericContainer<?> arcade1 = createPersistentArcadeContainer("arcadedb-1", SERVER_LIST, "majority", network);
@@ -329,7 +329,7 @@ void testCompletePartitionNoQuorum() throws Exception {
329329
@Test
330330
@Timeout(value = 10, unit = TimeUnit.MINUTES)
331331
@DisplayName("Test cluster reformation: verify proper Raft leader election after partition healing")
332-
void testClusterReformation() throws Exception {
332+
void clusterReformation() throws Exception {
333333
logger.info("Creating 3-node Raft HA cluster (persistent for restart)");
334334
final GenericContainer<?> arcade0 = createPersistentArcadeContainer("arcadedb-0", SERVER_LIST, "majority", network);
335335
final GenericContainer<?> arcade1 = createPersistentArcadeContainer("arcadedb-1", SERVER_LIST, "majority", network);
@@ -436,7 +436,7 @@ void testClusterReformation() throws Exception {
436436
@Test
437437
@Timeout(value = 10, unit = TimeUnit.MINUTES)
438438
@DisplayName("Test quorum loss recovery: verify cluster recovers after temporary quorum loss")
439-
void testQuorumLossRecovery() throws Exception {
439+
void quorumLossRecovery() throws Exception {
440440
logger.info("Creating 3-node Raft HA cluster with majority quorum (2/3) (persistent for restart)");
441441
final GenericContainer<?> arcade0 = createPersistentArcadeContainer("arcadedb-0", SERVER_LIST, "majority", network);
442442
final GenericContainer<?> arcade1 = createPersistentArcadeContainer("arcadedb-1", SERVER_LIST, "majority", network);

engine/src/test/java/com/arcadedb/engine/ApplyChangesPartialReplayTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ protected void beginTest() {
4545
}
4646

4747
@Test
48-
void testPartialReplayAppliesRemainingPages() throws Exception {
48+
void partialReplayAppliesRemainingPages() throws Exception {
4949
final DatabaseInternal db = (DatabaseInternal) database;
5050

5151
// Insert records to ensure we have pages with known versions

0 commit comments

Comments
 (0)