Skip to content
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

RDBC-885 Add 7.0 to GHA RavenDB version matrix (node.js/java) #106

Merged
merged 2 commits into from
Jan 13, 2025
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
2 changes: 1 addition & 1 deletion .github/workflows/RavenClient.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
strategy:
matrix:
java-version: [8, 11, 14, 16, 17, 21]
serverVersion: ["6.0", "6.2"]
serverVersion: ["6.0", "6.2", "7.0"]
fail-fast: false

steps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ private static ProcessStartInfo getProcessStartInfo(RavenServerLocator locator)
"--RunInMemory=true",
"--License.Eula.Accepted=true",
"--Setup.Mode=None",
"--Logs.Mode=None",
"--Testing.ParentProcessId=" + getProcessId("0")
};

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package net.ravendb.client.infrastructure;

import org.apache.commons.lang3.StringUtils;
import org.junit.jupiter.api.extension.ConditionEvaluationResult;
import org.junit.jupiter.api.extension.ExecutionCondition;
import org.junit.jupiter.api.extension.ExtensionContext;

public class DisableOn70ServerCondition implements ExecutionCondition {

public static final String ENV_RAVENDB_SERVER_VERSION = "RAVENDB_SERVER_VERSION";

@Override
public ConditionEvaluationResult evaluateExecutionCondition(ExtensionContext extensionContext) {
String ravenServerVersion = System.getenv(ENV_RAVENDB_SERVER_VERSION);

if (StringUtils.isEmpty(ravenServerVersion) || ravenServerVersion.compareTo("7.0") > 0) {
return ConditionEvaluationResult.disabled("Test disabled on 7.0 server");
}

return ConditionEvaluationResult.enabled("Test enabled");
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package net.ravendb.client.infrastructure;

import org.junit.jupiter.api.extension.ExtendWith;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Target({ ElementType.TYPE, ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
@ExtendWith(DisableOn70ServerCondition.class)
public @interface DisabledOn70Server {
}
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public AverageHeartRateDaily_ByDateAndCity() {
" .aggregate(g => ({\n" +
" heartBeat: g.values.reduce((total, val) => val.heartBeat + total, 0) / g.values.reduce((total, val) => val.count + total, 0),\n" +
" date: g.key.date,\n" +
" city: g.key.city\n" +
" city: g.key.city,\n" +
" count: g.values.reduce((total, val) => val.count + total, 0)\n" +
" }))");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import net.ravendb.client.RemoteTestBase;
import net.ravendb.client.documents.IDocumentStore;
import net.ravendb.client.infrastructure.DisabledOn70Server;
import net.ravendb.client.serverwide.operations.logs.GetLogsConfigurationOperation;
import net.ravendb.client.serverwide.operations.logs.GetLogsConfigurationResult;
import net.ravendb.client.serverwide.operations.logs.LogMode;
Expand All @@ -12,6 +13,7 @@

import static org.assertj.core.api.Assertions.assertThat;

@DisabledOn70Server
public class RavenDB_11440Test extends RemoteTestBase {

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import net.ravendb.client.RemoteTestBase;
import net.ravendb.client.documents.IDocumentStore;
import net.ravendb.client.infrastructure.DisabledOn70Server;
import net.ravendb.client.serverwide.operations.logs.GetLogsConfigurationOperation;
import net.ravendb.client.serverwide.operations.logs.GetLogsConfigurationResult;
import net.ravendb.client.serverwide.operations.logs.LogMode;
Expand All @@ -10,6 +11,7 @@

import static org.assertj.core.api.Assertions.assertThat;

@DisabledOn70Server
public class LogsConfigurationTest extends RemoteTestBase {

@Test
Expand All @@ -22,10 +24,10 @@ public void canGetAndSetLogging() throws Exception {
store.maintenance().server().send(getOperation);

assertThat(logsConfig.getCurrentMode())
.isEqualTo(LogMode.NONE);
.isEqualTo(LogMode.OPERATIONS);

assertThat(logsConfig.getMode())
.isEqualTo(LogMode.NONE);
.isEqualTo(LogMode.OPERATIONS);

// now try to set mode to operations and info
SetLogsConfigurationOperation.Parameters parameters = new SetLogsConfigurationOperation.Parameters();
Expand All @@ -43,7 +45,7 @@ public void canGetAndSetLogging() throws Exception {
.isEqualTo(LogMode.INFORMATION);

assertThat(logsConfig.getMode())
.isEqualTo(LogMode.NONE);
.isEqualTo(LogMode.OPERATIONS);
} finally {
// try to clean up

Expand Down
Loading