diff --git a/yaml-tests/src/main/java/com/apple/foundationdb/relational/yamltests/server/RunExternalServerExtension.java b/yaml-tests/src/main/java/com/apple/foundationdb/relational/yamltests/server/RunExternalServerExtension.java index a8d490ce8a..c3d0416d6c 100644 --- a/yaml-tests/src/main/java/com/apple/foundationdb/relational/yamltests/server/RunExternalServerExtension.java +++ b/yaml-tests/src/main/java/com/apple/foundationdb/relational/yamltests/server/RunExternalServerExtension.java @@ -23,7 +23,6 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Assumptions; import org.junit.jupiter.api.extension.AfterAllCallback; import org.junit.jupiter.api.extension.BeforeAllCallback; import org.junit.jupiter.api.extension.ExtensionContext; @@ -87,7 +86,6 @@ public String getVersion() { @Override public void beforeAll(ExtensionContext context) throws Exception { - Assumptions.abort(); // Will be able to re-enable when we have a published external server to use here File jar; if (jarName == null) { final File externalDirectory = new File(Objects.requireNonNull(System.getProperty(EXTERNAL_SERVER_PROPERTY_NAME))); @@ -103,11 +101,7 @@ public void beforeAll(ExtensionContext context) throws Exception { processBuilder.redirectOutput(ProcessBuilder.Redirect.INHERIT); processBuilder.redirectError(ProcessBuilder.Redirect.INHERIT); - this.serverProcess = processBuilder.start(); - - // TODO: There should be a better way to figure out that the server is fully up and running - Thread.sleep(3000); - if (!serverProcess.isAlive()) { + if (!startServer(processBuilder)) { Assertions.fail("Failed to start the external server"); } @@ -135,4 +129,22 @@ public void afterAll(ExtensionContext context) throws Exception { } } + private boolean startServer(ProcessBuilder processBuilder) throws IOException, InterruptedException { + try { + serverProcess = processBuilder.start(); + // TODO: There should be a better way to figure out that the server is fully up and running + Thread.sleep(3000); + if (!serverProcess.isAlive()) { + throw new Exception("Failed to start server once - retrying"); + } + return true; + } catch (Exception ex) { + // Try once more + serverProcess = processBuilder.start(); + // TODO: There should be a better way to figure out that the server is fully up and running + Thread.sleep(3000); + } + + return serverProcess.isAlive(); + } } diff --git a/yaml-tests/src/test/java/JDBCYamlIntegrationTests.java b/yaml-tests/src/test/java/JDBCYamlIntegrationTests.java index 34449a5831..1ce0731857 100644 --- a/yaml-tests/src/test/java/JDBCYamlIntegrationTests.java +++ b/yaml-tests/src/test/java/JDBCYamlIntegrationTests.java @@ -3,7 +3,7 @@ * * This source file is part of the FoundationDB open source project * - * Copyright 2021-2024 Apple Inc. and the FoundationDB project authors + * Copyright 2015-2025 Apple Inc. and the FoundationDB project authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,69 +27,6 @@ */ public abstract class JDBCYamlIntegrationTests extends YamlIntegrationTests { - @Override - @Test - @Disabled("TODO: Flakey") - public void orderBy() throws Exception { - super.orderBy(); - } - - @Override - @Test - @Disabled("TODO: Flakey") - public void scenarioTests() throws Exception { - super.scenarioTests(); - } - - @Override - @Test - @Disabled("Requires continuation support") - public void versionsTests() throws Exception { - super.versionsTests(); - } - - @Override - @Test - @Disabled("TODO: Need to work on supporting labels") - public void maxRows() throws Exception { - super.maxRows(); - } - - @Override - @Test - @Disabled("TODO") - public void selectAStar() throws Exception { - super.selectAStar(); - } - - @Override - @Test - @Disabled("TODO: Flakey") - public void aggregateIndexTestsCount() throws Exception { - super.aggregateIndexTestsCount(); - } - - @Override - @Test - @Disabled("TODO: Flakey") - public void joinTests() throws Exception { - super.joinTests(); - } - - @Override - @Test - @Disabled("TODO: Flakey") - public void nested() throws Exception { - super.nested(); - } - - @Override - @Test - @Disabled("TODO: Flakey") - public void showcasingTests() throws Exception { - super.showcasingTests(); - } - @Override @Test @Disabled("TODO: Not supported") diff --git a/yaml-tests/src/test/java/MultiServerJDBCYamlTests.java b/yaml-tests/src/test/java/MultiServerJDBCYamlTests.java index 7e5ef1c8a4..7d31cdc411 100644 --- a/yaml-tests/src/test/java/MultiServerJDBCYamlTests.java +++ b/yaml-tests/src/test/java/MultiServerJDBCYamlTests.java @@ -3,7 +3,7 @@ * * This source file is part of the FoundationDB open source project * - * Copyright 2021-2024 Apple Inc. and the FoundationDB project authors + * Copyright 2015-2025 Apple Inc. and the FoundationDB project authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,7 +22,6 @@ import com.apple.foundationdb.relational.yamltests.MultiServerConnectionFactory; import com.apple.foundationdb.relational.yamltests.YamlRunner; import com.apple.foundationdb.relational.yamltests.server.RunExternalServerExtension; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.extension.RegisterExtension; @@ -93,40 +92,4 @@ public Set getVersionsUnderTest() { } }; } - - @Override - @Disabled("Test asserts about quantifiers") - public void updateDeleteReturning() throws Exception { - super.updateDeleteReturning(); - } - - @Override - @Disabled("Test asserts about quantifiers") - public void indexedFunctions() throws Exception { - super.indexedFunctions(); - } - - @Override - @Disabled("Test asserts about quantifiers") - public void bitmap() throws Exception { - super.bitmap(); - } - - @Override - @Disabled("Test asserts about quantifiers") - public void cte() throws Exception { - super.cte(); - } - - @Override - @Disabled("Test asserts about quantifiers") - public void unionEmptyTables() throws Exception { - super.unionEmptyTables(); - } - - @Override - @Disabled("Test asserts about quantifiers") - public void union() throws Exception { - super.union(); - } }