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

getLivenessCheckPortNumbers() should return mapped port #5734

Merged
merged 27 commits into from Sep 28, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
1a5fb3e
getLivenessCheckPortNumbers() should return mapped port
aidando73 Aug 16, 2022
4b68ef3
refactor to exclude unnecessary getLivenessCheckPortNumbers override
aidando73 Aug 18, 2022
4612773
MySQL liveness check port numbers were missing
aidando73 Aug 18, 2022
707fce0
Apply formatting
aidando73 Aug 18, 2022
305ec3c
Merge remote-tracking branch 'upstream/master' into get-liveness-chec…
aidando73 Aug 19, 2022
0441361
Merge branch 'master' into get-liveness-check-mapped-port
kiview Aug 19, 2022
ccfbf79
Make fixes binary compatible
aidando73 Aug 20, 2022
851a557
Merge branch 'get-liveness-check-mapped-port' of github.com:REslim30/…
aidando73 Aug 20, 2022
6b72b41
Merge branch 'master' into get-liveness-check-mapped-port
kiview Aug 23, 2022
f6db6e4
Nginx module to use super liveness check ports
aidando73 Aug 23, 2022
d909ee3
add deprecated warnings to inherited deprecated methods
aidando73 Aug 23, 2022
94e8ad3
PostgresSQL to use super class getLivenessCheckPorts
aidando73 Aug 23, 2022
1342ae1
presto container to use correct liveness check ports and also use sup…
aidando73 Aug 23, 2022
5ad92e9
tidb container to use super class liveness check ports
aidando73 Aug 23, 2022
210e304
trino container to get liveness check ports from super class
aidando73 Aug 23, 2022
84595d7
Db2 container to use super class liveness check ports
aidando73 Aug 23, 2022
90468fb
Merge branch 'get-liveness-check-mapped-port' of github.com:REslim30/…
aidando73 Aug 23, 2022
ccf58b4
apply code formatter
aidando73 Aug 23, 2022
83ef259
Add forgotten renamed files
aidando73 Aug 25, 2022
e38c47e
undo rename on test
aidando73 Sep 3, 2022
f9a2745
undo rename on tests
aidando73 Sep 3, 2022
8069018
Use an assertion instead of an extra test
aidando73 Sep 3, 2022
d80f509
Use an assertion instead of an extra test
aidando73 Sep 3, 2022
3ea042c
spotless apply
aidando73 Sep 3, 2022
286e9d3
use static variable for mssql and db2 ports
aidando73 Sep 3, 2022
54ae626
Merge remote-tracking branch 'upstream/master' into get-liveness-chec…
aidando73 Sep 3, 2022
5e1bef9
removed @Test anotation on assertion
aidando73 Sep 3, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -64,7 +64,7 @@ public MSSQLServerContainer(final DockerImageName dockerImageName) {

@Override
public Set<Integer> getLivenessCheckPortNumbers() {
return Sets.newHashSet(MS_SQL_SERVER_PORT);
return Sets.newHashSet(getMappedPort(MS_SQL_SERVER_PORT));
}
aidando73 marked this conversation as resolved.
Show resolved Hide resolved

@Override
Expand Down
Expand Up @@ -3,6 +3,7 @@
import org.junit.Test;
import org.testcontainers.MSSQLServerTestImages;
import org.testcontainers.containers.MSSQLServerContainer;
import org.testcontainers.containers.wait.strategy.Wait;
import org.testcontainers.db.AbstractContainerDatabaseTest;

import java.sql.ResultSet;
Expand Down Expand Up @@ -64,4 +65,14 @@ public void testSetupDatabase() throws SQLException {
assertThat(resultSetInt).as("A basic SELECT query succeeds").isEqualTo(3);
}
}

@Test
public void testListeningPortWaitStrategy() throws Exception {
try (
MSSQLServerContainer<?> mssqlServer = new MSSQLServerContainer<>(MSSQLServerTestImages.MSSQL_SERVER_IMAGE)
) {
mssqlServer.start();
Wait.forListeningPort().waitUntilReady(mssqlServer);
}
}
aidando73 marked this conversation as resolved.
Show resolved Hide resolved
}