Skip to content

Version 8.0 #606

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
test: removed checks for db version, edition and storage engine
  • Loading branch information
rashtao committed Jun 6, 2025
commit 33ffe99cbf35f0e352f40a3dfe8cfe5fee2166c3

Large diffs are not rendered by default.

129 changes: 9 additions & 120 deletions test-functional/src/test/java/com/arangodb/ArangoCollectionTest.java

Large diffs are not rendered by default.

54 changes: 14 additions & 40 deletions test-functional/src/test/java/com/arangodb/ArangoDBAsyncTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ void createWithNotNormalizedName(ArangoDBAsync arangoDB) throws ExecutionExcepti
@MethodSource("asyncArangos")
void createDatabaseWithOptions(ArangoDBAsync arangoDB) throws ExecutionException, InterruptedException {
assumeTrue(isCluster());
assumeTrue(isAtLeastVersion(3, 6));
final String dbName = rndDbName();
final Boolean resultCreate = arangoDB.createDatabase(new DBCreateOptions()
.name(dbName)
Expand All @@ -139,8 +138,6 @@ void createDatabaseWithOptions(ArangoDBAsync arangoDB) throws ExecutionException
@MethodSource("asyncArangos")
void createDatabaseWithOptionsSatellite(ArangoDBAsync arangoDB) throws ExecutionException, InterruptedException {
assumeTrue(isCluster());
assumeTrue(isEnterprise());
assumeTrue(isAtLeastVersion(3, 6));

final String dbName = rndDbName();
final Boolean resultCreate = arangoDB.createDatabase(new DBCreateOptions()
Expand Down Expand Up @@ -401,16 +398,13 @@ void executeGetVersion(ArangoDBAsync arangoDB) throws ExecutionException, Interr
assertThat(body.get("version").isTextual()).isTrue();
assertThat(body.get("details").isObject()).isTrue();
assertThat(response.getResponseCode()).isEqualTo(200);
if (isAtLeastVersion(3, 9)) {
String header = response.getHeaders().get("x-arango-queue-time-seconds");
assertThat(header).isNotNull();
}
String header = response.getHeaders().get("x-arango-queue-time-seconds");
assertThat(header).isNotNull();
}

@ParameterizedTest
@MethodSource("asyncArangos")
void getLogEntries(ArangoDBAsync arangoDB) throws ExecutionException, InterruptedException {
assumeTrue(isAtLeastVersion(3, 8));
final LogEntriesEntity logs = arangoDB.getLogEntries(null).get();
assertThat(logs.getTotal()).isPositive();
assertThat(logs.getMessages()).hasSize(logs.getTotal().intValue());
Expand All @@ -419,7 +413,6 @@ void getLogEntries(ArangoDBAsync arangoDB) throws ExecutionException, Interrupte
@ParameterizedTest
@MethodSource("asyncArangos")
void getLogEntriesUpto(ArangoDBAsync arangoDB) throws ExecutionException, InterruptedException {
assumeTrue(isAtLeastVersion(3, 8));
final LogEntriesEntity logsUpto = arangoDB.getLogEntries(new LogOptions().upto(LogLevel.WARNING)).get();
assertThat(logsUpto.getMessages())
.map(LogEntriesEntity.Message::getLevel)
Expand All @@ -429,7 +422,6 @@ void getLogEntriesUpto(ArangoDBAsync arangoDB) throws ExecutionException, Interr
@ParameterizedTest
@MethodSource("asyncArangos")
void getLogEntriesLevel(ArangoDBAsync arangoDB) throws ExecutionException, InterruptedException {
assumeTrue(isAtLeastVersion(3, 8));
final LogEntriesEntity logsInfo = arangoDB.getLogEntries(new LogOptions().level(LogLevel.INFO)).get();
assertThat(logsInfo.getMessages())
.map(LogEntriesEntity.Message::getLevel)
Expand All @@ -439,7 +431,6 @@ void getLogEntriesLevel(ArangoDBAsync arangoDB) throws ExecutionException, Inter
@ParameterizedTest
@MethodSource("asyncArangos")
void getLogEntriesStart(ArangoDBAsync arangoDB) throws ExecutionException, InterruptedException {
assumeTrue(isAtLeastVersion(3, 8));
final LogEntriesEntity logs = arangoDB.getLogEntries(null).get();
final Long firstId = logs.getMessages().get(0).getId();
final LogEntriesEntity logsStart = arangoDB.getLogEntries(new LogOptions().start(firstId + 1)).get();
Expand All @@ -451,7 +442,6 @@ void getLogEntriesStart(ArangoDBAsync arangoDB) throws ExecutionException, Inter
@ParameterizedTest
@MethodSource("asyncArangos")
void getLogEntriesSize(ArangoDBAsync arangoDB) throws ExecutionException, InterruptedException {
assumeTrue(isAtLeastVersion(3, 8));
final LogEntriesEntity logs = arangoDB.getLogEntries(null).get();
int count = logs.getMessages().size();
assertThat(count).isPositive();
Expand All @@ -462,7 +452,6 @@ void getLogEntriesSize(ArangoDBAsync arangoDB) throws ExecutionException, Interr
@ParameterizedTest
@MethodSource("asyncArangos")
void getLogEntriesOffset(ArangoDBAsync arangoDB) throws ExecutionException, InterruptedException {
assumeTrue(isAtLeastVersion(3, 8));
final LogEntriesEntity logs = arangoDB.getLogEntries(null).get();
assertThat(logs.getTotal()).isPositive();
Long firstId = logs.getMessages().get(0).getId();
Expand All @@ -475,7 +464,6 @@ void getLogEntriesOffset(ArangoDBAsync arangoDB) throws ExecutionException, Inte
@ParameterizedTest
@MethodSource("asyncArangos")
void getLogEntriesSearch(ArangoDBAsync arangoDB) throws ExecutionException, InterruptedException {
assumeTrue(isAtLeastVersion(3, 8));
final LogEntriesEntity logs = arangoDB.getLogEntries(null).get();
final LogEntriesEntity logsSearch = arangoDB.getLogEntries(new LogOptions().search(getTestDb())).get();
assertThat(logs.getTotal()).isGreaterThan(logsSearch.getTotal());
Expand All @@ -484,7 +472,6 @@ void getLogEntriesSearch(ArangoDBAsync arangoDB) throws ExecutionException, Inte
@ParameterizedTest
@MethodSource("asyncArangos")
void getLogEntriesSortAsc(ArangoDBAsync arangoDB) throws ExecutionException, InterruptedException {
assumeTrue(isAtLeastVersion(3, 8));
final LogEntriesEntity logs = arangoDB.getLogEntries(new LogOptions().sort(SortOrder.asc)).get();
long lastId = -1;
List<Long> ids = logs.getMessages().stream()
Expand All @@ -499,7 +486,6 @@ void getLogEntriesSortAsc(ArangoDBAsync arangoDB) throws ExecutionException, Int
@ParameterizedTest
@MethodSource("asyncArangos")
void getLogEntriesSortDesc(ArangoDBAsync arangoDB) throws ExecutionException, InterruptedException {
assumeTrue(isAtLeastVersion(3, 8));
final LogEntriesEntity logs = arangoDB.getLogEntries(new LogOptions().sort(SortOrder.desc)).get();
long lastId = Long.MAX_VALUE;
List<Long> ids = logs.getMessages().stream()
Expand All @@ -514,15 +500,13 @@ void getLogEntriesSortDesc(ArangoDBAsync arangoDB) throws ExecutionException, In
@ParameterizedTest
@MethodSource("asyncArangos")
void getLogLevel(ArangoDBAsync arangoDB) throws ExecutionException, InterruptedException {
assumeTrue(isAtLeastVersion(3, 7)); // it fails in 3.6 active-failover (BTS-362)
final LogLevelEntity logLevel = arangoDB.getLogLevel().get();
assertThat(logLevel.getAgency()).isEqualTo(LogLevelEntity.LogLevel.INFO);
}

@ParameterizedTest
@MethodSource("asyncArangos")
void setLogLevel(ArangoDBAsync arangoDB) throws ExecutionException, InterruptedException {
assumeTrue(isAtLeastVersion(3, 7)); // it fails in 3.6 active-failover (BTS-362)
final LogLevelEntity entity = new LogLevelEntity();
try {
entity.setAgency(LogLevelEntity.LogLevel.ERROR);
Expand All @@ -537,7 +521,6 @@ void setLogLevel(ArangoDBAsync arangoDB) throws ExecutionException, InterruptedE
@ParameterizedTest
@MethodSource("asyncArangos")
void setAllLogLevel(ArangoDBAsync arangoDB) throws ExecutionException, InterruptedException {
assumeTrue(isAtLeastVersion(3, 9));
final LogLevelEntity entity = new LogLevelEntity();
try {
entity.setAll(LogLevelEntity.LogLevel.ERROR);
Expand All @@ -555,7 +538,6 @@ void setAllLogLevel(ArangoDBAsync arangoDB) throws ExecutionException, Interrupt
@ParameterizedTest
@MethodSource("asyncArangos")
void logLevelWithServerId(ArangoDBAsync arangoDB) throws ExecutionException, InterruptedException {
assumeTrue(isAtLeastVersion(3, 10));
assumeTrue(isCluster());
String serverId = arangoDB.getServerId().get();
LogLevelOptions options = new LogLevelOptions().serverId(serverId);
Expand All @@ -574,7 +556,6 @@ void logLevelWithServerId(ArangoDBAsync arangoDB) throws ExecutionException, Int
@ParameterizedTest
@MethodSource("asyncArangos")
void resetLogLevels(ArangoDBAsync arangoDB) throws ExecutionException, InterruptedException {
assumeTrue(isAtLeastVersion(3, 12));
LogLevelOptions options = new LogLevelOptions();
LogLevelEntity entity = new LogLevelEntity();
entity.setGraphs(LogLevelEntity.LogLevel.ERROR);
Expand All @@ -589,7 +570,6 @@ void resetLogLevels(ArangoDBAsync arangoDB) throws ExecutionException, Interrupt
@ParameterizedTest
@MethodSource("asyncArangos")
void resetLogLevelsWithServerId(ArangoDBAsync arangoDB) throws ExecutionException, InterruptedException {
assumeTrue(isAtLeastVersion(3, 12));
assumeTrue(isCluster());
String serverId = arangoDB.getServerId().get();
LogLevelOptions options = new LogLevelOptions().serverId(serverId);
Expand All @@ -607,7 +587,6 @@ void resetLogLevelsWithServerId(ArangoDBAsync arangoDB) throws ExecutionExceptio
@ParameterizedTest
@MethodSource("asyncArangos")
void getQueryOptimizerRules(ArangoDBAsync arangoDB) throws ExecutionException, InterruptedException {
assumeTrue(isAtLeastVersion(3, 10));
final Collection<QueryOptimizerRule> rules = arangoDB.getQueryOptimizerRules().get();
assertThat(rules).isNotEmpty();
for (QueryOptimizerRule rule : rules) {
Expand Down Expand Up @@ -679,27 +658,22 @@ void queueTime(ArangoDBAsync arangoDB) throws InterruptedException, ExecutionExc
QueueTimeMetrics qt = arangoDB.metrics().getQueueTime();
double avg = qt.getAvg();
QueueTimeSample[] values = qt.getValues();
if (isAtLeastVersion(3, 9)) {
assertThat(values).hasSize(20);
for (int i = 0; i < values.length; i++) {
assertThat(values[i].value).isNotNegative();
if (i > 0) {
assertThat(values[i].timestamp).isGreaterThanOrEqualTo(values[i - 1].timestamp);
}
assertThat(values).hasSize(20);
for (int i = 0; i < values.length; i++) {
assertThat(values[i].value).isNotNegative();
if (i > 0) {
assertThat(values[i].timestamp).isGreaterThanOrEqualTo(values[i - 1].timestamp);
}
}

if (avg < 0.0) {
System.err.println("avg < 0: " + avg);
System.err.println("got values:");
for (QueueTimeSample v : values) {
System.err.println(v.value);
}
if (avg < 0.0) {
System.err.println("avg < 0: " + avg);
System.err.println("got values:");
for (QueueTimeSample v : values) {
System.err.println(v.value);
}
assertThat(avg).isNotNegative();
} else {
assertThat(avg).isEqualTo(0.0);
assertThat(values).isEmpty();
}
assertThat(avg).isNotNegative();

}
}
Loading