Skip to content
Open
Show file tree
Hide file tree
Changes from 4 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
4 changes: 2 additions & 2 deletions .github/workflows/backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -822,7 +822,7 @@ jobs:
matrix:
java: [ '8', '11' ]
os: [ 'ubuntu-latest' ]
timeout-minutes: 120
timeout-minutes: 150
steps:
- uses: actions/checkout@v2
- name: Set up JDK ${{ matrix.java }}
Expand Down Expand Up @@ -950,7 +950,7 @@ jobs:
matrix:
java: [ '8', '11' ]
os: [ 'ubuntu-latest' ]
timeout-minutes: 100
timeout-minutes: 120
steps:
- uses: actions/checkout@v2
- name: Set up JDK ${{ matrix.java }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -463,5 +463,10 @@ public void tearDown() throws Exception {
this.container.stop();
LOG.info("Container stopped");
}

if (this.minioContainer != null) {
this.minioContainer.stop();
LOG.info("MinIO container stopped");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ protected void initializeJdbcConnection(String jdbcUrl)
connection.setAutoCommit(false);
}

protected void createNeededTables() {
protected void createNeededTables() throws SQLException {
try (Statement statement = connection.createStatement()) {
String createTemplate = jdbcCase.getCreateSql();

Expand Down Expand Up @@ -319,12 +319,10 @@ protected void createNeededTables() {
}

connection.commit();
} catch (Exception exception) {
exception.printStackTrace();
}
}

protected void insertTestData() {
protected void insertTestData() throws SQLException {
try (PreparedStatement preparedStatement =
connection.prepareStatement(jdbcCase.getInsertSql())) {

Expand All @@ -340,8 +338,6 @@ protected void insertTestData() {
preparedStatement.executeBatch();

connection.commit();
} catch (Exception exception) {
exception.printStackTrace();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,7 @@ public void testMasterNodeActive() {
CoordinatorService coordinatorService1 = server1.getCoordinatorService();
Assertions.assertTrue(coordinatorService1.isCoordinatorActive());

Assertions.assertThrows(
SeaTunnelEngineException.class, () -> server2.getCoordinatorService());
Assertions.assertThrows(SeaTunnelEngineException.class, server2::getCoordinatorService);

// shutdown instance1
instance1.shutdown();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import org.apache.seatunnel.engine.server.SeaTunnelServerStarter;
import org.apache.seatunnel.engine.server.TestUtils;

import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
Expand All @@ -43,6 +44,7 @@
class BaseServletTest extends AbstractSeaTunnelServerTest {

private static final int HTTP_PORT = 18080;
private static SeaTunnelConfig seaTunnelConfig;

private static final Long JOB_1 = System.currentTimeMillis() + 1L;

Expand All @@ -51,7 +53,7 @@ void setUp() {
String name = this.getClass().getName();
Config hazelcastConfig = Config.loadFromString(getHazelcastConfig());
hazelcastConfig.setClusterName(TestUtils.getClusterName("RestApiServletTest_" + name));
SeaTunnelConfig seaTunnelConfig = loadSeaTunnelConfig();
seaTunnelConfig = loadSeaTunnelConfig();
seaTunnelConfig.setHazelcastConfig(hazelcastConfig);
seaTunnelConfig.getEngineConfig().setMode(ExecutionMode.LOCAL);

Expand All @@ -65,6 +67,12 @@ void setUp() {
LOGGER = nodeEngine.getLogger(AbstractSeaTunnelServerTest.class);
}

@AfterAll
public void resetConfig() {
seaTunnelConfig.getEngineConfig().getHttpConfig().setEnabled(false);
seaTunnelConfig.getEngineConfig().getHttpConfig().setEnableHttps(false);
}

@Test
void testWriteJsonWithObject() throws IOException {
startJob(JOB_1, "fake_to_console.conf");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import org.apache.seatunnel.engine.server.SeaTunnelServerStarter;
import org.apache.seatunnel.engine.server.TestUtils;

import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
Expand All @@ -48,6 +49,7 @@
@DisabledOnOs(OS.WINDOWS)
public class RestApiHttpsForTruststoreTest extends AbstractSeaTunnelServerTest {
private int httpPort;
private static SeaTunnelConfig seaTunnelConfig;
private static final int HTTPS_PORT = 18443;
private static final String SERVER_KEYSTORE_PASSWORD = "server_keystore_password";
private static final String SERVER_TRUSTSTORE_PASSWORD = "server_truststore_password";
Expand All @@ -60,7 +62,7 @@ public void setUp() {
Config hazelcastConfig = Config.loadFromString(getHazelcastConfig());
hazelcastConfig.setClusterName(
TestUtils.getClusterName("RestApiHttpsForTruststoreTest_" + name));
SeaTunnelConfig seaTunnelConfig = loadSeaTunnelConfig();
seaTunnelConfig = loadSeaTunnelConfig();
seaTunnelConfig.setHazelcastConfig(hazelcastConfig);
seaTunnelConfig.getEngineConfig().setMode(ExecutionMode.LOCAL);

Expand All @@ -85,6 +87,12 @@ public void setUp() {
LOGGER = nodeEngine.getLogger(AbstractSeaTunnelServerTest.class);
}

@AfterAll
public void resetConfig() {
seaTunnelConfig.getEngineConfig().getHttpConfig().setEnabled(false);
seaTunnelConfig.getEngineConfig().getHttpConfig().setEnableHttps(false);
}

public String getPath(String confFile) {
return System.getProperty("user.dir") + "/src/test/resources/https/" + confFile;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import org.apache.seatunnel.engine.server.SeaTunnelServerStarter;
import org.apache.seatunnel.engine.server.TestUtils;

import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
Expand All @@ -50,12 +51,14 @@ public class RestApiHttpsTest extends AbstractSeaTunnelServerTest {
private static final String SERVER_KEYSTORE_PASSWORD = "server_keystore_password";
private static final String CLIENT_KEYSTORE_PASSWORD = "client_keystore_password";

private static SeaTunnelConfig seaTunnelConfig;

@BeforeAll
public void setUp() {
String name = this.getClass().getName();
Config hazelcastConfig = Config.loadFromString(getHazelcastConfig());
hazelcastConfig.setClusterName(TestUtils.getClusterName("RestApiHttpsTest_" + name));
SeaTunnelConfig seaTunnelConfig = loadSeaTunnelConfig();
seaTunnelConfig = loadSeaTunnelConfig();
seaTunnelConfig.setHazelcastConfig(hazelcastConfig);
seaTunnelConfig.getEngineConfig().setMode(ExecutionMode.LOCAL);

Expand All @@ -75,6 +78,12 @@ public void setUp() {
LOGGER = nodeEngine.getLogger(AbstractSeaTunnelServerTest.class);
}

@AfterAll
public void resetConfig() {
seaTunnelConfig.getEngineConfig().getHttpConfig().setEnabled(false);
seaTunnelConfig.getEngineConfig().getHttpConfig().setEnableHttps(false);
}

public String getPath(String confFile) {
return System.getProperty("user.dir") + "/src/test/resources/https/" + confFile;
}
Expand Down