From cadc5094713548719e1db462092b7f551c1b6f1f Mon Sep 17 00:00:00 2001 From: Scott Dugas Date: Fri, 14 Mar 2025 12:32:18 -0400 Subject: [PATCH 1/3] Allow specifying a custom cluster file to YamlTestExtension This allows running yamsql tests with a custom cluster file that is not specified via the environment variable. This doesn't add support for doing this with the @YamlTest annotation. --- .../foundationdb/relational/server/FRL.java | 6 ++-- .../server/InProcessRelationalServer.java | 15 +++++++-- .../yamltests/YamlTestExtension.java | 33 ++++++++++++------- .../yamltests/configs/EmbeddedConfig.java | 7 +++- .../configs/JDBCInProcessConfig.java | 8 ++++- .../configs/JDBCMultiServerConfig.java | 4 +-- .../yamltests/server/ExternalServer.java | 13 +++----- .../src/test/java/InitialVersionTest.java | 2 +- .../src/test/java/SupportedVersionTest.java | 2 +- yaml-tests/src/test/java/YamlTestBase.java | 2 +- 10 files changed, 59 insertions(+), 33 deletions(-) diff --git a/fdb-relational-server/src/main/java/com/apple/foundationdb/relational/server/FRL.java b/fdb-relational-server/src/main/java/com/apple/foundationdb/relational/server/FRL.java index d7c3d139dc..9c2b3809a2 100644 --- a/fdb-relational-server/src/main/java/com/apple/foundationdb/relational/server/FRL.java +++ b/fdb-relational-server/src/main/java/com/apple/foundationdb/relational/server/FRL.java @@ -83,12 +83,12 @@ public class FRL implements AutoCloseable { @SpotBugsSuppressWarnings(value = "CT_CONSTRUCTOR_THROW", justification = "Should consider refactoring but throwing exceptions for now") public FRL() throws RelationalException { - this(Options.NONE); + this(Options.NONE, null); } @SpotBugsSuppressWarnings(value = "CT_CONSTRUCTOR_THROW", justification = "Should consider refactoring but throwing exceptions for now") - public FRL(@Nonnull Options options) throws RelationalException { - final FDBDatabase fdbDb = FDBDatabaseFactory.instance().getDatabase(); + public FRL(@Nonnull Options options, @Nullable String clusterFile) throws RelationalException { + final FDBDatabase fdbDb = FDBDatabaseFactory.instance().getDatabase(clusterFile); final Long asyncToSyncTimeout = options.getOption(Options.Name.ASYNC_OPERATIONS_TIMEOUT_MILLIS); if (asyncToSyncTimeout > 0) { fdbDb.setAsyncToSyncTimeout(asyncToSyncTimeout, TimeUnit.MILLISECONDS); diff --git a/fdb-relational-server/src/main/java/com/apple/foundationdb/relational/server/InProcessRelationalServer.java b/fdb-relational-server/src/main/java/com/apple/foundationdb/relational/server/InProcessRelationalServer.java index b4b7c33538..69fb74fc8e 100644 --- a/fdb-relational-server/src/main/java/com/apple/foundationdb/relational/server/InProcessRelationalServer.java +++ b/fdb-relational-server/src/main/java/com/apple/foundationdb/relational/server/InProcessRelationalServer.java @@ -22,12 +22,14 @@ import com.apple.foundationdb.annotation.API; +import com.apple.foundationdb.relational.api.Options; import com.apple.foundationdb.relational.api.exceptions.RelationalException; import com.apple.foundationdb.relational.server.jdbc.v1.JDBCService; import io.grpc.Server; import io.grpc.inprocess.InProcessServerBuilder; +import javax.annotation.Nullable; import java.io.Closeable; import java.io.IOException; import java.io.InterruptedIOException; @@ -46,13 +48,20 @@ public class InProcessRelationalServer implements Closeable { private Server grpcInProcessServer; private FRL frl; private final String serverName; + @Nullable + private final String clusterFile; public InProcessRelationalServer() { - this(InProcessServerBuilder.generateName()); + this(InProcessServerBuilder.generateName(), null); } - InProcessRelationalServer(String serverName) { + public InProcessRelationalServer(@Nullable final String clusterFile) { + this(InProcessServerBuilder.generateName(), clusterFile); + } + + InProcessRelationalServer(String serverName, @Nullable final String clusterFile) { this.serverName = serverName; + this.clusterFile = clusterFile; } public String getServerName() { @@ -68,7 +77,7 @@ public InProcessRelationalServer start() throws IOException { // Create access to backing database. // TODO: Make this multi-query/-tenant/-database! try { - this.frl = new FRL(); + this.frl = new FRL(Options.NONE, clusterFile); } catch (RelationalException ve) { throw new IOException(ve); } diff --git a/yaml-tests/src/main/java/com/apple/foundationdb/relational/yamltests/YamlTestExtension.java b/yaml-tests/src/main/java/com/apple/foundationdb/relational/yamltests/YamlTestExtension.java index b715341509..81f57081e7 100644 --- a/yaml-tests/src/main/java/com/apple/foundationdb/relational/yamltests/YamlTestExtension.java +++ b/yaml-tests/src/main/java/com/apple/foundationdb/relational/yamltests/YamlTestExtension.java @@ -64,11 +64,20 @@ public class YamlTestExtension implements TestTemplateInvocationContextProvider, private List testConfigs; private List maintainConfigs; private List servers; + private final String clusterFile; + + public YamlTestExtension() { + this.clusterFile = System.getenv("FDB_CLUSTER_FILE"); + } + + public YamlTestExtension(final String clusterFile) { + this.clusterFile = clusterFile; + } @Override public void beforeAll(final ExtensionContext context) throws Exception { if (Boolean.parseBoolean(System.getProperty("tests.runQuick", "false"))) { - testConfigs = List.of(new EmbeddedConfig()); + testConfigs = List.of(new EmbeddedConfig(clusterFile)); maintainConfigs = List.of(); } else { AtomicInteger serverPort = new AtomicInteger(1111); @@ -78,7 +87,9 @@ public void beforeAll(final ExtensionContext context) throws Exception { // Potentially, we can relax this a little if all tests are disabled for multi-server execution, but this is // not a likely scenario. Assertions.assertFalse(jars.isEmpty(), "There are no external servers available to run"); - servers = jars.stream().map(jar -> new ExternalServer(jar, serverPort.getAndIncrement(), serverPort.getAndIncrement())).collect(Collectors.toList()); + servers = jars.stream() + .map(jar -> new ExternalServer(jar, serverPort.getAndIncrement(), serverPort.getAndIncrement(), clusterFile)) + .collect(Collectors.toList()); for (ExternalServer server : servers) { server.start(); } @@ -94,10 +105,10 @@ public void beforeAll(final ExtensionContext context) throws Exception { externalServerConfigs).collect(Collectors.toList()); maintainConfigs = List.of( - new CorrectExplains(new EmbeddedConfig()), - new CorrectMetrics(new EmbeddedConfig()), - new CorrectExplainsAndMetrics(new EmbeddedConfig()), - new ShowPlanOnDiff(new EmbeddedConfig()) + new CorrectExplains(new EmbeddedConfig(clusterFile)), + new CorrectMetrics(new EmbeddedConfig(clusterFile)), + new CorrectExplainsAndMetrics(new EmbeddedConfig(clusterFile)), + new ShowPlanOnDiff(new EmbeddedConfig(clusterFile)) ); } for (final YamlTestConfig testConfig : Iterables.concat(testConfigs, maintainConfigs)) { @@ -109,7 +120,7 @@ private Stream localConfigs(final boolean mixedModeOnly, final b if (mixedModeOnly || singleExternalVersionOnly) { return Stream.of(); } else { - return Stream.of(new EmbeddedConfig(), new JDBCInProcessConfig()); + return Stream.of(new EmbeddedConfig(clusterFile), new JDBCInProcessConfig(clusterFile)); } } @@ -124,10 +135,10 @@ private Stream externalServerConfigs(final boolean singleExterna } else { return servers.stream().flatMap(server -> // (4 configs for each server available) - Stream.of(new JDBCMultiServerConfig(0, server), - new ForceContinuations(new JDBCMultiServerConfig(0, server)), - new JDBCMultiServerConfig(1, server), - new ForceContinuations(new JDBCMultiServerConfig(1, server)))); + Stream.of(new JDBCMultiServerConfig(0, server, clusterFile), + new ForceContinuations(new JDBCMultiServerConfig(0, server, clusterFile)), + new JDBCMultiServerConfig(1, server, clusterFile), + new ForceContinuations(new JDBCMultiServerConfig(1, server, clusterFile)))); } } diff --git a/yaml-tests/src/main/java/com/apple/foundationdb/relational/yamltests/configs/EmbeddedConfig.java b/yaml-tests/src/main/java/com/apple/foundationdb/relational/yamltests/configs/EmbeddedConfig.java index 0dc78f9ddd..d8a0cb5603 100644 --- a/yaml-tests/src/main/java/com/apple/foundationdb/relational/yamltests/configs/EmbeddedConfig.java +++ b/yaml-tests/src/main/java/com/apple/foundationdb/relational/yamltests/configs/EmbeddedConfig.java @@ -33,6 +33,11 @@ */ public class EmbeddedConfig implements YamlTestConfig { private FRL frl; + private final String clusterFile; + + public EmbeddedConfig(final String clusterFile) { + this.clusterFile = clusterFile; + } @Override public void beforeAll() throws Exception { @@ -42,7 +47,7 @@ public void beforeAll() throws Exception { .withOption(Options.Name.PLAN_CACHE_TERTIARY_TIME_TO_LIVE_MILLIS, 3_600_000L) .withOption(Options.Name.PLAN_CACHE_PRIMARY_MAX_ENTRIES, 10) .build(); - frl = new FRL(options); + frl = new FRL(options, clusterFile); } @Override diff --git a/yaml-tests/src/main/java/com/apple/foundationdb/relational/yamltests/configs/JDBCInProcessConfig.java b/yaml-tests/src/main/java/com/apple/foundationdb/relational/yamltests/configs/JDBCInProcessConfig.java index 4e09353d72..cb962754df 100644 --- a/yaml-tests/src/main/java/com/apple/foundationdb/relational/yamltests/configs/JDBCInProcessConfig.java +++ b/yaml-tests/src/main/java/com/apple/foundationdb/relational/yamltests/configs/JDBCInProcessConfig.java @@ -34,11 +34,17 @@ public class JDBCInProcessConfig implements YamlTestConfig { @Nullable private InProcessRelationalServer server; + @Nullable + private final String clusterFile; + + public JDBCInProcessConfig(@Nullable final String clusterFile) { + this.clusterFile = clusterFile; + } @Override public void beforeAll() throws Exception { try { - server = new InProcessRelationalServer().start(); + server = new InProcessRelationalServer(clusterFile).start(); } catch (Exception e) { throw new RuntimeException(e); } diff --git a/yaml-tests/src/main/java/com/apple/foundationdb/relational/yamltests/configs/JDBCMultiServerConfig.java b/yaml-tests/src/main/java/com/apple/foundationdb/relational/yamltests/configs/JDBCMultiServerConfig.java index afa5caadc5..427c50c914 100644 --- a/yaml-tests/src/main/java/com/apple/foundationdb/relational/yamltests/configs/JDBCMultiServerConfig.java +++ b/yaml-tests/src/main/java/com/apple/foundationdb/relational/yamltests/configs/JDBCMultiServerConfig.java @@ -35,8 +35,8 @@ public class JDBCMultiServerConfig extends JDBCInProcessConfig { private final ExternalServer externalServer; private final int initialConnection; - public JDBCMultiServerConfig(final int initialConnection, ExternalServer externalServer) { - super(); + public JDBCMultiServerConfig(final int initialConnection, ExternalServer externalServer, final String clusterFile) { + super(clusterFile); this.initialConnection = initialConnection; this.externalServer = externalServer; } diff --git a/yaml-tests/src/main/java/com/apple/foundationdb/relational/yamltests/server/ExternalServer.java b/yaml-tests/src/main/java/com/apple/foundationdb/relational/yamltests/server/ExternalServer.java index b86ba86938..2149acde53 100644 --- a/yaml-tests/src/main/java/com/apple/foundationdb/relational/yamltests/server/ExternalServer.java +++ b/yaml-tests/src/main/java/com/apple/foundationdb/relational/yamltests/server/ExternalServer.java @@ -48,24 +48,18 @@ public class ExternalServer { private final int httpPort; private SemanticVersion version; private Process serverProcess; - - /** - * Create a new instance that will run latest released version of the server, as downloaded by gradle. - * This assumes only one server exists in the download directory. - */ - public ExternalServer(final int grpcPort, final int httpPort) { - this(null, grpcPort, httpPort); - } + private String clusterFile; /** * Create a new instance that will run a specific jar. * * @param serverJar the path to the jar to run */ - public ExternalServer(File serverJar, final int grpcPort, final int httpPort) { + public ExternalServer(File serverJar, final int grpcPort, final int httpPort, final String clusterFile) { this.serverJar = serverJar; this.grpcPort = grpcPort; this.httpPort = httpPort; + this.clusterFile = clusterFile; } static { @@ -129,6 +123,7 @@ public void start() throws Exception { ProcessBuilder.Redirect.DISCARD; processBuilder.redirectOutput(out); processBuilder.redirectError(err); + processBuilder.environment().put("FDB_CLUSTER_FILE", clusterFile); if (!startServer(processBuilder)) { Assertions.fail("Failed to start the external server"); diff --git a/yaml-tests/src/test/java/InitialVersionTest.java b/yaml-tests/src/test/java/InitialVersionTest.java index af247c76aa..84f85fae23 100644 --- a/yaml-tests/src/test/java/InitialVersionTest.java +++ b/yaml-tests/src/test/java/InitialVersionTest.java @@ -44,7 +44,7 @@ */ public class InitialVersionTest { private static final SemanticVersion VERSION = SemanticVersion.parse("3.0.18.0"); - private static final EmbeddedConfig config = new EmbeddedConfig(); + private static final EmbeddedConfig config = new EmbeddedConfig(null); @BeforeAll static void beforeAll() throws Exception { diff --git a/yaml-tests/src/test/java/SupportedVersionTest.java b/yaml-tests/src/test/java/SupportedVersionTest.java index b1739f1b12..c98230d4ed 100644 --- a/yaml-tests/src/test/java/SupportedVersionTest.java +++ b/yaml-tests/src/test/java/SupportedVersionTest.java @@ -45,7 +45,7 @@ public class SupportedVersionTest { private static final SemanticVersion VERSION = SemanticVersion.parse("3.0.18.0"); - private static final EmbeddedConfig config = new EmbeddedConfig(); + private static final EmbeddedConfig config = new EmbeddedConfig(null); @BeforeAll static void beforeAll() throws Exception { diff --git a/yaml-tests/src/test/java/YamlTestBase.java b/yaml-tests/src/test/java/YamlTestBase.java index d59c67805d..3073ab2d16 100644 --- a/yaml-tests/src/test/java/YamlTestBase.java +++ b/yaml-tests/src/test/java/YamlTestBase.java @@ -37,7 +37,7 @@ public static void beforeAll() throws RelationalException, SQLException { .withOption(Options.Name.PLAN_CACHE_SECONDARY_TIME_TO_LIVE_MILLIS, 3_600_000L) .withOption(Options.Name.PLAN_CACHE_TERTIARY_TIME_TO_LIVE_MILLIS, 3_600_000L) .build(); - frl = new FRL(options); + frl = new FRL(options, null); } @AfterAll From 4257a786e9fe1d0cdc878aac7f12fb191403fc31 Mon Sep 17 00:00:00 2001 From: Scott Dugas Date: Mon, 17 Mar 2025 12:55:17 -0400 Subject: [PATCH 2/3] Support null cluster file This is ok, it will get it from the environment variable if it is null, but we can't set the environment variable to null. --- .../relational/yamltests/YamlTestExtension.java | 5 +++-- .../relational/yamltests/server/ExternalServer.java | 12 +++++++++--- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/yaml-tests/src/main/java/com/apple/foundationdb/relational/yamltests/YamlTestExtension.java b/yaml-tests/src/main/java/com/apple/foundationdb/relational/yamltests/YamlTestExtension.java index 81f57081e7..58f1307585 100644 --- a/yaml-tests/src/main/java/com/apple/foundationdb/relational/yamltests/YamlTestExtension.java +++ b/yaml-tests/src/main/java/com/apple/foundationdb/relational/yamltests/YamlTestExtension.java @@ -64,13 +64,14 @@ public class YamlTestExtension implements TestTemplateInvocationContextProvider, private List testConfigs; private List maintainConfigs; private List servers; + @Nullable private final String clusterFile; public YamlTestExtension() { - this.clusterFile = System.getenv("FDB_CLUSTER_FILE"); + this.clusterFile = null; // it will get it from the environment } - public YamlTestExtension(final String clusterFile) { + public YamlTestExtension(@Nullable final String clusterFile) { this.clusterFile = clusterFile; } diff --git a/yaml-tests/src/main/java/com/apple/foundationdb/relational/yamltests/server/ExternalServer.java b/yaml-tests/src/main/java/com/apple/foundationdb/relational/yamltests/server/ExternalServer.java index 2149acde53..81aa5f6455 100644 --- a/yaml-tests/src/main/java/com/apple/foundationdb/relational/yamltests/server/ExternalServer.java +++ b/yaml-tests/src/main/java/com/apple/foundationdb/relational/yamltests/server/ExternalServer.java @@ -25,6 +25,7 @@ import org.apache.logging.log4j.Logger; import org.junit.jupiter.api.Assertions; +import javax.annotation.Nullable; import java.io.File; import java.io.IOException; import java.util.Arrays; @@ -43,19 +44,22 @@ public class ExternalServer { public static final String EXTERNAL_SERVER_PROPERTY_NAME = "yaml_testing_external_server"; private static final boolean SAVE_SERVER_OUTPUT = false; + @Nullable private final File serverJar; private final int grpcPort; private final int httpPort; private SemanticVersion version; private Process serverProcess; - private String clusterFile; + @Nullable + private final String clusterFile; /** * Create a new instance that will run a specific jar. * * @param serverJar the path to the jar to run */ - public ExternalServer(File serverJar, final int grpcPort, final int httpPort, final String clusterFile) { + public ExternalServer(@Nullable File serverJar, final int grpcPort, final int httpPort, + @Nullable final String clusterFile) { this.serverJar = serverJar; this.grpcPort = grpcPort; this.httpPort = httpPort; @@ -123,7 +127,9 @@ public void start() throws Exception { ProcessBuilder.Redirect.DISCARD; processBuilder.redirectOutput(out); processBuilder.redirectError(err); - processBuilder.environment().put("FDB_CLUSTER_FILE", clusterFile); + if (clusterFile != null) { + processBuilder.environment().put("FDB_CLUSTER_FILE", clusterFile); + } if (!startServer(processBuilder)) { Assertions.fail("Failed to start the external server"); From 01f037b0e41113d70b3a200e0cda1f34c7294ffe Mon Sep 17 00:00:00 2001 From: Scott Dugas Date: Mon, 17 Mar 2025 14:39:04 -0400 Subject: [PATCH 3/3] Make the changes backwards compatible --- .../com/apple/foundationdb/relational/server/FRL.java | 7 ++++--- .../relational/yamltests/configs/EmbeddedConfig.java | 8 +++++++- .../yamltests/configs/JDBCInProcessConfig.java | 4 ++++ .../yamltests/configs/JDBCMultiServerConfig.java | 8 +++++++- .../relational/yamltests/server/ExternalServer.java | 9 +++++++++ 5 files changed, 31 insertions(+), 5 deletions(-) diff --git a/fdb-relational-server/src/main/java/com/apple/foundationdb/relational/server/FRL.java b/fdb-relational-server/src/main/java/com/apple/foundationdb/relational/server/FRL.java index 9c2b3809a2..7ff7244ed9 100644 --- a/fdb-relational-server/src/main/java/com/apple/foundationdb/relational/server/FRL.java +++ b/fdb-relational-server/src/main/java/com/apple/foundationdb/relational/server/FRL.java @@ -50,7 +50,6 @@ import com.apple.foundationdb.relational.recordlayer.ddl.RecordLayerMetadataOperationsFactory; import com.apple.foundationdb.relational.recordlayer.query.cache.RelationalPlanCache; import com.apple.foundationdb.relational.recordlayer.util.ExceptionUtil; -import com.apple.foundationdb.relational.util.SpotBugsSuppressWarnings; import javax.annotation.Nonnull; import javax.annotation.Nullable; @@ -81,12 +80,14 @@ public class FRL implements AutoCloseable { private final RelationalDriver driver; private boolean registeredJDBCEmbedDriver; - @SpotBugsSuppressWarnings(value = "CT_CONSTRUCTOR_THROW", justification = "Should consider refactoring but throwing exceptions for now") public FRL() throws RelationalException { this(Options.NONE, null); } - @SpotBugsSuppressWarnings(value = "CT_CONSTRUCTOR_THROW", justification = "Should consider refactoring but throwing exceptions for now") + public FRL(@Nonnull Options options) throws RelationalException { + this(options, null); + } + public FRL(@Nonnull Options options, @Nullable String clusterFile) throws RelationalException { final FDBDatabase fdbDb = FDBDatabaseFactory.instance().getDatabase(clusterFile); final Long asyncToSyncTimeout = options.getOption(Options.Name.ASYNC_OPERATIONS_TIMEOUT_MILLIS); diff --git a/yaml-tests/src/main/java/com/apple/foundationdb/relational/yamltests/configs/EmbeddedConfig.java b/yaml-tests/src/main/java/com/apple/foundationdb/relational/yamltests/configs/EmbeddedConfig.java index d8a0cb5603..f07f3565bb 100644 --- a/yaml-tests/src/main/java/com/apple/foundationdb/relational/yamltests/configs/EmbeddedConfig.java +++ b/yaml-tests/src/main/java/com/apple/foundationdb/relational/yamltests/configs/EmbeddedConfig.java @@ -27,15 +27,21 @@ import com.apple.foundationdb.relational.yamltests.connectionfactory.EmbeddedYamlConnectionFactory; import javax.annotation.Nonnull; +import javax.annotation.Nullable; /** * Run directly against an instance of {@link FRL}. */ public class EmbeddedConfig implements YamlTestConfig { private FRL frl; + @Nullable private final String clusterFile; - public EmbeddedConfig(final String clusterFile) { + public EmbeddedConfig() { + this(null); + } + + public EmbeddedConfig(@Nullable final String clusterFile) { this.clusterFile = clusterFile; } diff --git a/yaml-tests/src/main/java/com/apple/foundationdb/relational/yamltests/configs/JDBCInProcessConfig.java b/yaml-tests/src/main/java/com/apple/foundationdb/relational/yamltests/configs/JDBCInProcessConfig.java index cb962754df..cc7887e843 100644 --- a/yaml-tests/src/main/java/com/apple/foundationdb/relational/yamltests/configs/JDBCInProcessConfig.java +++ b/yaml-tests/src/main/java/com/apple/foundationdb/relational/yamltests/configs/JDBCInProcessConfig.java @@ -37,6 +37,10 @@ public class JDBCInProcessConfig implements YamlTestConfig { @Nullable private final String clusterFile; + public JDBCInProcessConfig() { + this(null); + } + public JDBCInProcessConfig(@Nullable final String clusterFile) { this.clusterFile = clusterFile; } diff --git a/yaml-tests/src/main/java/com/apple/foundationdb/relational/yamltests/configs/JDBCMultiServerConfig.java b/yaml-tests/src/main/java/com/apple/foundationdb/relational/yamltests/configs/JDBCMultiServerConfig.java index 427c50c914..90b8fe6c00 100644 --- a/yaml-tests/src/main/java/com/apple/foundationdb/relational/yamltests/configs/JDBCMultiServerConfig.java +++ b/yaml-tests/src/main/java/com/apple/foundationdb/relational/yamltests/configs/JDBCMultiServerConfig.java @@ -25,6 +25,7 @@ import com.apple.foundationdb.relational.yamltests.connectionfactory.MultiServerConnectionFactory; import com.apple.foundationdb.relational.yamltests.server.ExternalServer; +import javax.annotation.Nullable; import java.util.List; /** @@ -35,7 +36,12 @@ public class JDBCMultiServerConfig extends JDBCInProcessConfig { private final ExternalServer externalServer; private final int initialConnection; - public JDBCMultiServerConfig(final int initialConnection, ExternalServer externalServer, final String clusterFile) { + public JDBCMultiServerConfig(final int initialConnection, ExternalServer externalServer) { + this(initialConnection, externalServer, null); + } + + public JDBCMultiServerConfig(final int initialConnection, ExternalServer externalServer, + @Nullable final String clusterFile) { super(clusterFile); this.initialConnection = initialConnection; this.externalServer = externalServer; diff --git a/yaml-tests/src/main/java/com/apple/foundationdb/relational/yamltests/server/ExternalServer.java b/yaml-tests/src/main/java/com/apple/foundationdb/relational/yamltests/server/ExternalServer.java index 81aa5f6455..b5e02f76d7 100644 --- a/yaml-tests/src/main/java/com/apple/foundationdb/relational/yamltests/server/ExternalServer.java +++ b/yaml-tests/src/main/java/com/apple/foundationdb/relational/yamltests/server/ExternalServer.java @@ -53,6 +53,15 @@ public class ExternalServer { @Nullable private final String clusterFile; + /** + * Create a new instance that will run a specific jar. + * + * @param serverJar the path to the jar to run + */ + public ExternalServer(@Nullable File serverJar, final int grpcPort, final int httpPort) { + this(serverJar, grpcPort, httpPort, null); + } + /** * Create a new instance that will run a specific jar. *