You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 28, 2018. It is now read-only.
- ResourceMethodInvoker had an unused import.
- Attempted a fix for frequently failing SSL tests:
- added better synchronisation for variables storing the test SSL-secured HTTP server instances
- selected a safer default port for the test SSL-secured HTTP server
Change-Id: I711bb73ea7374f3d7d05fae06405e93ac197fe70
Signed-off-by: Marek Potociar <[email protected]>
Copy file name to clipboardExpand all lines: tests/e2e/src/test/java/org/glassfish/jersey/tests/e2e/client/connector/ssl/SslConnectorConfigurationTest.java
+18-3Lines changed: 18 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -90,7 +90,7 @@ public class SslConnectorConfigurationTest {
90
90
*/
91
91
@Parameterized.Parameters(name = "{index}: {0}")
92
92
publicstaticIterable<Object[]> testData() {
93
-
returnArrays.asList(newObject[][]{
93
+
returnArrays.asList(newObject[][]{
94
94
{newHttpUrlConnectorProvider()},
95
95
{newGrizzlyConnectorProvider()},
96
96
{newJettyConnectorProvider()},
@@ -101,14 +101,29 @@ public static Iterable<Object[]> testData() {
101
101
@Parameterized.Parameter(0)
102
102
publicConnectorProviderconnectorProvider;
103
103
104
+
privatefinalObjectserverGuard = newObject();
105
+
privateServerserver = null;
106
+
104
107
@Before
105
108
publicvoidsetUp() throwsException {
106
-
Server.startServer();
109
+
synchronized (serverGuard) {
110
+
if (server != null) {
111
+
thrownewIllegalStateException(
112
+
"Test run sync issue: Another instance of the SSL-secured HTTP test server has been already started.");
113
+
}
114
+
server = Server.start();
115
+
}
107
116
}
108
117
109
118
@After
110
119
publicvoidtearDown() throwsException {
111
-
Server.stopServer();
120
+
synchronized (serverGuard) {
121
+
if (server == null) {
122
+
thrownewIllegalStateException("Test run sync issue: There is no SSL-secured HTTP test server to stop.");
0 commit comments