@@ -113,7 +113,6 @@ void createWithNotNormalizedName(ArangoDBAsync arangoDB) throws ExecutionExcepti
113
113
@ MethodSource ("asyncArangos" )
114
114
void createDatabaseWithOptions (ArangoDBAsync arangoDB ) throws ExecutionException , InterruptedException {
115
115
assumeTrue (isCluster ());
116
- assumeTrue (isAtLeastVersion (3 , 6 ));
117
116
final String dbName = rndDbName ();
118
117
final Boolean resultCreate = arangoDB .createDatabase (new DBCreateOptions ()
119
118
.name (dbName )
@@ -139,8 +138,6 @@ void createDatabaseWithOptions(ArangoDBAsync arangoDB) throws ExecutionException
139
138
@ MethodSource ("asyncArangos" )
140
139
void createDatabaseWithOptionsSatellite (ArangoDBAsync arangoDB ) throws ExecutionException , InterruptedException {
141
140
assumeTrue (isCluster ());
142
- assumeTrue (isEnterprise ());
143
- assumeTrue (isAtLeastVersion (3 , 6 ));
144
141
145
142
final String dbName = rndDbName ();
146
143
final Boolean resultCreate = arangoDB .createDatabase (new DBCreateOptions ()
@@ -401,16 +398,13 @@ void executeGetVersion(ArangoDBAsync arangoDB) throws ExecutionException, Interr
401
398
assertThat (body .get ("version" ).isTextual ()).isTrue ();
402
399
assertThat (body .get ("details" ).isObject ()).isTrue ();
403
400
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 ();
408
403
}
409
404
410
405
@ ParameterizedTest
411
406
@ MethodSource ("asyncArangos" )
412
407
void getLogEntries (ArangoDBAsync arangoDB ) throws ExecutionException , InterruptedException {
413
- assumeTrue (isAtLeastVersion (3 , 8 ));
414
408
final LogEntriesEntity logs = arangoDB .getLogEntries (null ).get ();
415
409
assertThat (logs .getTotal ()).isPositive ();
416
410
assertThat (logs .getMessages ()).hasSize (logs .getTotal ().intValue ());
@@ -419,7 +413,6 @@ void getLogEntries(ArangoDBAsync arangoDB) throws ExecutionException, Interrupte
419
413
@ ParameterizedTest
420
414
@ MethodSource ("asyncArangos" )
421
415
void getLogEntriesUpto (ArangoDBAsync arangoDB ) throws ExecutionException , InterruptedException {
422
- assumeTrue (isAtLeastVersion (3 , 8 ));
423
416
final LogEntriesEntity logsUpto = arangoDB .getLogEntries (new LogOptions ().upto (LogLevel .WARNING )).get ();
424
417
assertThat (logsUpto .getMessages ())
425
418
.map (LogEntriesEntity .Message ::getLevel )
@@ -429,7 +422,6 @@ void getLogEntriesUpto(ArangoDBAsync arangoDB) throws ExecutionException, Interr
429
422
@ ParameterizedTest
430
423
@ MethodSource ("asyncArangos" )
431
424
void getLogEntriesLevel (ArangoDBAsync arangoDB ) throws ExecutionException , InterruptedException {
432
- assumeTrue (isAtLeastVersion (3 , 8 ));
433
425
final LogEntriesEntity logsInfo = arangoDB .getLogEntries (new LogOptions ().level (LogLevel .INFO )).get ();
434
426
assertThat (logsInfo .getMessages ())
435
427
.map (LogEntriesEntity .Message ::getLevel )
@@ -439,7 +431,6 @@ void getLogEntriesLevel(ArangoDBAsync arangoDB) throws ExecutionException, Inter
439
431
@ ParameterizedTest
440
432
@ MethodSource ("asyncArangos" )
441
433
void getLogEntriesStart (ArangoDBAsync arangoDB ) throws ExecutionException , InterruptedException {
442
- assumeTrue (isAtLeastVersion (3 , 8 ));
443
434
final LogEntriesEntity logs = arangoDB .getLogEntries (null ).get ();
444
435
final Long firstId = logs .getMessages ().get (0 ).getId ();
445
436
final LogEntriesEntity logsStart = arangoDB .getLogEntries (new LogOptions ().start (firstId + 1 )).get ();
@@ -451,7 +442,6 @@ void getLogEntriesStart(ArangoDBAsync arangoDB) throws ExecutionException, Inter
451
442
@ ParameterizedTest
452
443
@ MethodSource ("asyncArangos" )
453
444
void getLogEntriesSize (ArangoDBAsync arangoDB ) throws ExecutionException , InterruptedException {
454
- assumeTrue (isAtLeastVersion (3 , 8 ));
455
445
final LogEntriesEntity logs = arangoDB .getLogEntries (null ).get ();
456
446
int count = logs .getMessages ().size ();
457
447
assertThat (count ).isPositive ();
@@ -462,7 +452,6 @@ void getLogEntriesSize(ArangoDBAsync arangoDB) throws ExecutionException, Interr
462
452
@ ParameterizedTest
463
453
@ MethodSource ("asyncArangos" )
464
454
void getLogEntriesOffset (ArangoDBAsync arangoDB ) throws ExecutionException , InterruptedException {
465
- assumeTrue (isAtLeastVersion (3 , 8 ));
466
455
final LogEntriesEntity logs = arangoDB .getLogEntries (null ).get ();
467
456
assertThat (logs .getTotal ()).isPositive ();
468
457
Long firstId = logs .getMessages ().get (0 ).getId ();
@@ -475,7 +464,6 @@ void getLogEntriesOffset(ArangoDBAsync arangoDB) throws ExecutionException, Inte
475
464
@ ParameterizedTest
476
465
@ MethodSource ("asyncArangos" )
477
466
void getLogEntriesSearch (ArangoDBAsync arangoDB ) throws ExecutionException , InterruptedException {
478
- assumeTrue (isAtLeastVersion (3 , 8 ));
479
467
final LogEntriesEntity logs = arangoDB .getLogEntries (null ).get ();
480
468
final LogEntriesEntity logsSearch = arangoDB .getLogEntries (new LogOptions ().search (getTestDb ())).get ();
481
469
assertThat (logs .getTotal ()).isGreaterThan (logsSearch .getTotal ());
@@ -484,7 +472,6 @@ void getLogEntriesSearch(ArangoDBAsync arangoDB) throws ExecutionException, Inte
484
472
@ ParameterizedTest
485
473
@ MethodSource ("asyncArangos" )
486
474
void getLogEntriesSortAsc (ArangoDBAsync arangoDB ) throws ExecutionException , InterruptedException {
487
- assumeTrue (isAtLeastVersion (3 , 8 ));
488
475
final LogEntriesEntity logs = arangoDB .getLogEntries (new LogOptions ().sort (SortOrder .asc )).get ();
489
476
long lastId = -1 ;
490
477
List <Long > ids = logs .getMessages ().stream ()
@@ -499,7 +486,6 @@ void getLogEntriesSortAsc(ArangoDBAsync arangoDB) throws ExecutionException, Int
499
486
@ ParameterizedTest
500
487
@ MethodSource ("asyncArangos" )
501
488
void getLogEntriesSortDesc (ArangoDBAsync arangoDB ) throws ExecutionException , InterruptedException {
502
- assumeTrue (isAtLeastVersion (3 , 8 ));
503
489
final LogEntriesEntity logs = arangoDB .getLogEntries (new LogOptions ().sort (SortOrder .desc )).get ();
504
490
long lastId = Long .MAX_VALUE ;
505
491
List <Long > ids = logs .getMessages ().stream ()
@@ -514,15 +500,13 @@ void getLogEntriesSortDesc(ArangoDBAsync arangoDB) throws ExecutionException, In
514
500
@ ParameterizedTest
515
501
@ MethodSource ("asyncArangos" )
516
502
void getLogLevel (ArangoDBAsync arangoDB ) throws ExecutionException , InterruptedException {
517
- assumeTrue (isAtLeastVersion (3 , 7 )); // it fails in 3.6 active-failover (BTS-362)
518
503
final LogLevelEntity logLevel = arangoDB .getLogLevel ().get ();
519
504
assertThat (logLevel .getAgency ()).isEqualTo (LogLevelEntity .LogLevel .INFO );
520
505
}
521
506
522
507
@ ParameterizedTest
523
508
@ MethodSource ("asyncArangos" )
524
509
void setLogLevel (ArangoDBAsync arangoDB ) throws ExecutionException , InterruptedException {
525
- assumeTrue (isAtLeastVersion (3 , 7 )); // it fails in 3.6 active-failover (BTS-362)
526
510
final LogLevelEntity entity = new LogLevelEntity ();
527
511
try {
528
512
entity .setAgency (LogLevelEntity .LogLevel .ERROR );
@@ -537,7 +521,6 @@ void setLogLevel(ArangoDBAsync arangoDB) throws ExecutionException, InterruptedE
537
521
@ ParameterizedTest
538
522
@ MethodSource ("asyncArangos" )
539
523
void setAllLogLevel (ArangoDBAsync arangoDB ) throws ExecutionException , InterruptedException {
540
- assumeTrue (isAtLeastVersion (3 , 9 ));
541
524
final LogLevelEntity entity = new LogLevelEntity ();
542
525
try {
543
526
entity .setAll (LogLevelEntity .LogLevel .ERROR );
@@ -555,7 +538,6 @@ void setAllLogLevel(ArangoDBAsync arangoDB) throws ExecutionException, Interrupt
555
538
@ ParameterizedTest
556
539
@ MethodSource ("asyncArangos" )
557
540
void logLevelWithServerId (ArangoDBAsync arangoDB ) throws ExecutionException , InterruptedException {
558
- assumeTrue (isAtLeastVersion (3 , 10 ));
559
541
assumeTrue (isCluster ());
560
542
String serverId = arangoDB .getServerId ().get ();
561
543
LogLevelOptions options = new LogLevelOptions ().serverId (serverId );
@@ -574,7 +556,6 @@ void logLevelWithServerId(ArangoDBAsync arangoDB) throws ExecutionException, Int
574
556
@ ParameterizedTest
575
557
@ MethodSource ("asyncArangos" )
576
558
void resetLogLevels (ArangoDBAsync arangoDB ) throws ExecutionException , InterruptedException {
577
- assumeTrue (isAtLeastVersion (3 , 12 ));
578
559
LogLevelOptions options = new LogLevelOptions ();
579
560
LogLevelEntity entity = new LogLevelEntity ();
580
561
entity .setGraphs (LogLevelEntity .LogLevel .ERROR );
@@ -589,7 +570,6 @@ void resetLogLevels(ArangoDBAsync arangoDB) throws ExecutionException, Interrupt
589
570
@ ParameterizedTest
590
571
@ MethodSource ("asyncArangos" )
591
572
void resetLogLevelsWithServerId (ArangoDBAsync arangoDB ) throws ExecutionException , InterruptedException {
592
- assumeTrue (isAtLeastVersion (3 , 12 ));
593
573
assumeTrue (isCluster ());
594
574
String serverId = arangoDB .getServerId ().get ();
595
575
LogLevelOptions options = new LogLevelOptions ().serverId (serverId );
@@ -607,7 +587,6 @@ void resetLogLevelsWithServerId(ArangoDBAsync arangoDB) throws ExecutionExceptio
607
587
@ ParameterizedTest
608
588
@ MethodSource ("asyncArangos" )
609
589
void getQueryOptimizerRules (ArangoDBAsync arangoDB ) throws ExecutionException , InterruptedException {
610
- assumeTrue (isAtLeastVersion (3 , 10 ));
611
590
final Collection <QueryOptimizerRule > rules = arangoDB .getQueryOptimizerRules ().get ();
612
591
assertThat (rules ).isNotEmpty ();
613
592
for (QueryOptimizerRule rule : rules ) {
@@ -679,27 +658,22 @@ void queueTime(ArangoDBAsync arangoDB) throws InterruptedException, ExecutionExc
679
658
QueueTimeMetrics qt = arangoDB .metrics ().getQueueTime ();
680
659
double avg = qt .getAvg ();
681
660
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 );
689
666
}
667
+ }
690
668
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 );
697
674
}
698
- assertThat (avg ).isNotNegative ();
699
- } else {
700
- assertThat (avg ).isEqualTo (0.0 );
701
- assertThat (values ).isEmpty ();
702
675
}
676
+ assertThat (avg ).isNotNegative ();
703
677
704
678
}
705
679
}
0 commit comments