Skip to content

Commit c7099a6

Browse files
committed
test: removed checks for db version, edition and storage engine
1 parent 0198213 commit c7099a6

22 files changed

+152
-971
lines changed

test-functional/src/test/java/com/arangodb/ArangoCollectionAsyncTest.java

Lines changed: 16 additions & 131 deletions
Large diffs are not rendered by default.

test-functional/src/test/java/com/arangodb/ArangoCollectionTest.java

Lines changed: 9 additions & 120 deletions
Large diffs are not rendered by default.

test-functional/src/test/java/com/arangodb/ArangoDBAsyncTest.java

Lines changed: 14 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ void createWithNotNormalizedName(ArangoDBAsync arangoDB) throws ExecutionExcepti
113113
@MethodSource("asyncArangos")
114114
void createDatabaseWithOptions(ArangoDBAsync arangoDB) throws ExecutionException, InterruptedException {
115115
assumeTrue(isCluster());
116-
assumeTrue(isAtLeastVersion(3, 6));
117116
final String dbName = rndDbName();
118117
final Boolean resultCreate = arangoDB.createDatabase(new DBCreateOptions()
119118
.name(dbName)
@@ -139,8 +138,6 @@ void createDatabaseWithOptions(ArangoDBAsync arangoDB) throws ExecutionException
139138
@MethodSource("asyncArangos")
140139
void createDatabaseWithOptionsSatellite(ArangoDBAsync arangoDB) throws ExecutionException, InterruptedException {
141140
assumeTrue(isCluster());
142-
assumeTrue(isEnterprise());
143-
assumeTrue(isAtLeastVersion(3, 6));
144141

145142
final String dbName = rndDbName();
146143
final Boolean resultCreate = arangoDB.createDatabase(new DBCreateOptions()
@@ -401,16 +398,13 @@ void executeGetVersion(ArangoDBAsync arangoDB) throws ExecutionException, Interr
401398
assertThat(body.get("version").isTextual()).isTrue();
402399
assertThat(body.get("details").isObject()).isTrue();
403400
assertThat(response.getResponseCode()).isEqualTo(200);
404-
if (isAtLeastVersion(3, 9)) {
405-
String header = response.getHeaders().get("x-arango-queue-time-seconds");
406-
assertThat(header).isNotNull();
407-
}
401+
String header = response.getHeaders().get("x-arango-queue-time-seconds");
402+
assertThat(header).isNotNull();
408403
}
409404

410405
@ParameterizedTest
411406
@MethodSource("asyncArangos")
412407
void getLogEntries(ArangoDBAsync arangoDB) throws ExecutionException, InterruptedException {
413-
assumeTrue(isAtLeastVersion(3, 8));
414408
final LogEntriesEntity logs = arangoDB.getLogEntries(null).get();
415409
assertThat(logs.getTotal()).isPositive();
416410
assertThat(logs.getMessages()).hasSize(logs.getTotal().intValue());
@@ -419,7 +413,6 @@ void getLogEntries(ArangoDBAsync arangoDB) throws ExecutionException, Interrupte
419413
@ParameterizedTest
420414
@MethodSource("asyncArangos")
421415
void getLogEntriesUpto(ArangoDBAsync arangoDB) throws ExecutionException, InterruptedException {
422-
assumeTrue(isAtLeastVersion(3, 8));
423416
final LogEntriesEntity logsUpto = arangoDB.getLogEntries(new LogOptions().upto(LogLevel.WARNING)).get();
424417
assertThat(logsUpto.getMessages())
425418
.map(LogEntriesEntity.Message::getLevel)
@@ -429,7 +422,6 @@ void getLogEntriesUpto(ArangoDBAsync arangoDB) throws ExecutionException, Interr
429422
@ParameterizedTest
430423
@MethodSource("asyncArangos")
431424
void getLogEntriesLevel(ArangoDBAsync arangoDB) throws ExecutionException, InterruptedException {
432-
assumeTrue(isAtLeastVersion(3, 8));
433425
final LogEntriesEntity logsInfo = arangoDB.getLogEntries(new LogOptions().level(LogLevel.INFO)).get();
434426
assertThat(logsInfo.getMessages())
435427
.map(LogEntriesEntity.Message::getLevel)
@@ -439,7 +431,6 @@ void getLogEntriesLevel(ArangoDBAsync arangoDB) throws ExecutionException, Inter
439431
@ParameterizedTest
440432
@MethodSource("asyncArangos")
441433
void getLogEntriesStart(ArangoDBAsync arangoDB) throws ExecutionException, InterruptedException {
442-
assumeTrue(isAtLeastVersion(3, 8));
443434
final LogEntriesEntity logs = arangoDB.getLogEntries(null).get();
444435
final Long firstId = logs.getMessages().get(0).getId();
445436
final LogEntriesEntity logsStart = arangoDB.getLogEntries(new LogOptions().start(firstId + 1)).get();
@@ -451,7 +442,6 @@ void getLogEntriesStart(ArangoDBAsync arangoDB) throws ExecutionException, Inter
451442
@ParameterizedTest
452443
@MethodSource("asyncArangos")
453444
void getLogEntriesSize(ArangoDBAsync arangoDB) throws ExecutionException, InterruptedException {
454-
assumeTrue(isAtLeastVersion(3, 8));
455445
final LogEntriesEntity logs = arangoDB.getLogEntries(null).get();
456446
int count = logs.getMessages().size();
457447
assertThat(count).isPositive();
@@ -462,7 +452,6 @@ void getLogEntriesSize(ArangoDBAsync arangoDB) throws ExecutionException, Interr
462452
@ParameterizedTest
463453
@MethodSource("asyncArangos")
464454
void getLogEntriesOffset(ArangoDBAsync arangoDB) throws ExecutionException, InterruptedException {
465-
assumeTrue(isAtLeastVersion(3, 8));
466455
final LogEntriesEntity logs = arangoDB.getLogEntries(null).get();
467456
assertThat(logs.getTotal()).isPositive();
468457
Long firstId = logs.getMessages().get(0).getId();
@@ -475,7 +464,6 @@ void getLogEntriesOffset(ArangoDBAsync arangoDB) throws ExecutionException, Inte
475464
@ParameterizedTest
476465
@MethodSource("asyncArangos")
477466
void getLogEntriesSearch(ArangoDBAsync arangoDB) throws ExecutionException, InterruptedException {
478-
assumeTrue(isAtLeastVersion(3, 8));
479467
final LogEntriesEntity logs = arangoDB.getLogEntries(null).get();
480468
final LogEntriesEntity logsSearch = arangoDB.getLogEntries(new LogOptions().search(getTestDb())).get();
481469
assertThat(logs.getTotal()).isGreaterThan(logsSearch.getTotal());
@@ -484,7 +472,6 @@ void getLogEntriesSearch(ArangoDBAsync arangoDB) throws ExecutionException, Inte
484472
@ParameterizedTest
485473
@MethodSource("asyncArangos")
486474
void getLogEntriesSortAsc(ArangoDBAsync arangoDB) throws ExecutionException, InterruptedException {
487-
assumeTrue(isAtLeastVersion(3, 8));
488475
final LogEntriesEntity logs = arangoDB.getLogEntries(new LogOptions().sort(SortOrder.asc)).get();
489476
long lastId = -1;
490477
List<Long> ids = logs.getMessages().stream()
@@ -499,7 +486,6 @@ void getLogEntriesSortAsc(ArangoDBAsync arangoDB) throws ExecutionException, Int
499486
@ParameterizedTest
500487
@MethodSource("asyncArangos")
501488
void getLogEntriesSortDesc(ArangoDBAsync arangoDB) throws ExecutionException, InterruptedException {
502-
assumeTrue(isAtLeastVersion(3, 8));
503489
final LogEntriesEntity logs = arangoDB.getLogEntries(new LogOptions().sort(SortOrder.desc)).get();
504490
long lastId = Long.MAX_VALUE;
505491
List<Long> ids = logs.getMessages().stream()
@@ -514,15 +500,13 @@ void getLogEntriesSortDesc(ArangoDBAsync arangoDB) throws ExecutionException, In
514500
@ParameterizedTest
515501
@MethodSource("asyncArangos")
516502
void getLogLevel(ArangoDBAsync arangoDB) throws ExecutionException, InterruptedException {
517-
assumeTrue(isAtLeastVersion(3, 7)); // it fails in 3.6 active-failover (BTS-362)
518503
final LogLevelEntity logLevel = arangoDB.getLogLevel().get();
519504
assertThat(logLevel.getAgency()).isEqualTo(LogLevelEntity.LogLevel.INFO);
520505
}
521506

522507
@ParameterizedTest
523508
@MethodSource("asyncArangos")
524509
void setLogLevel(ArangoDBAsync arangoDB) throws ExecutionException, InterruptedException {
525-
assumeTrue(isAtLeastVersion(3, 7)); // it fails in 3.6 active-failover (BTS-362)
526510
final LogLevelEntity entity = new LogLevelEntity();
527511
try {
528512
entity.setAgency(LogLevelEntity.LogLevel.ERROR);
@@ -537,7 +521,6 @@ void setLogLevel(ArangoDBAsync arangoDB) throws ExecutionException, InterruptedE
537521
@ParameterizedTest
538522
@MethodSource("asyncArangos")
539523
void setAllLogLevel(ArangoDBAsync arangoDB) throws ExecutionException, InterruptedException {
540-
assumeTrue(isAtLeastVersion(3, 9));
541524
final LogLevelEntity entity = new LogLevelEntity();
542525
try {
543526
entity.setAll(LogLevelEntity.LogLevel.ERROR);
@@ -555,7 +538,6 @@ void setAllLogLevel(ArangoDBAsync arangoDB) throws ExecutionException, Interrupt
555538
@ParameterizedTest
556539
@MethodSource("asyncArangos")
557540
void logLevelWithServerId(ArangoDBAsync arangoDB) throws ExecutionException, InterruptedException {
558-
assumeTrue(isAtLeastVersion(3, 10));
559541
assumeTrue(isCluster());
560542
String serverId = arangoDB.getServerId().get();
561543
LogLevelOptions options = new LogLevelOptions().serverId(serverId);
@@ -574,7 +556,6 @@ void logLevelWithServerId(ArangoDBAsync arangoDB) throws ExecutionException, Int
574556
@ParameterizedTest
575557
@MethodSource("asyncArangos")
576558
void resetLogLevels(ArangoDBAsync arangoDB) throws ExecutionException, InterruptedException {
577-
assumeTrue(isAtLeastVersion(3, 12));
578559
LogLevelOptions options = new LogLevelOptions();
579560
LogLevelEntity entity = new LogLevelEntity();
580561
entity.setGraphs(LogLevelEntity.LogLevel.ERROR);
@@ -589,7 +570,6 @@ void resetLogLevels(ArangoDBAsync arangoDB) throws ExecutionException, Interrupt
589570
@ParameterizedTest
590571
@MethodSource("asyncArangos")
591572
void resetLogLevelsWithServerId(ArangoDBAsync arangoDB) throws ExecutionException, InterruptedException {
592-
assumeTrue(isAtLeastVersion(3, 12));
593573
assumeTrue(isCluster());
594574
String serverId = arangoDB.getServerId().get();
595575
LogLevelOptions options = new LogLevelOptions().serverId(serverId);
@@ -607,7 +587,6 @@ void resetLogLevelsWithServerId(ArangoDBAsync arangoDB) throws ExecutionExceptio
607587
@ParameterizedTest
608588
@MethodSource("asyncArangos")
609589
void getQueryOptimizerRules(ArangoDBAsync arangoDB) throws ExecutionException, InterruptedException {
610-
assumeTrue(isAtLeastVersion(3, 10));
611590
final Collection<QueryOptimizerRule> rules = arangoDB.getQueryOptimizerRules().get();
612591
assertThat(rules).isNotEmpty();
613592
for (QueryOptimizerRule rule : rules) {
@@ -679,27 +658,22 @@ void queueTime(ArangoDBAsync arangoDB) throws InterruptedException, ExecutionExc
679658
QueueTimeMetrics qt = arangoDB.metrics().getQueueTime();
680659
double avg = qt.getAvg();
681660
QueueTimeSample[] values = qt.getValues();
682-
if (isAtLeastVersion(3, 9)) {
683-
assertThat(values).hasSize(20);
684-
for (int i = 0; i < values.length; i++) {
685-
assertThat(values[i].value).isNotNegative();
686-
if (i > 0) {
687-
assertThat(values[i].timestamp).isGreaterThanOrEqualTo(values[i - 1].timestamp);
688-
}
661+
assertThat(values).hasSize(20);
662+
for (int i = 0; i < values.length; i++) {
663+
assertThat(values[i].value).isNotNegative();
664+
if (i > 0) {
665+
assertThat(values[i].timestamp).isGreaterThanOrEqualTo(values[i - 1].timestamp);
689666
}
667+
}
690668

691-
if (avg < 0.0) {
692-
System.err.println("avg < 0: " + avg);
693-
System.err.println("got values:");
694-
for (QueueTimeSample v : values) {
695-
System.err.println(v.value);
696-
}
669+
if (avg < 0.0) {
670+
System.err.println("avg < 0: " + avg);
671+
System.err.println("got values:");
672+
for (QueueTimeSample v : values) {
673+
System.err.println(v.value);
697674
}
698-
assertThat(avg).isNotNegative();
699-
} else {
700-
assertThat(avg).isEqualTo(0.0);
701-
assertThat(values).isEmpty();
702675
}
676+
assertThat(avg).isNotNegative();
703677

704678
}
705679
}

0 commit comments

Comments
 (0)