Skip to content

Commit 8e45b5a

Browse files
authored
Make TCK @BeforeClass method non-static (RestAssured setup process) (#677)
Signed-off-by: Michael Edgar <michael@xlate.io>
1 parent 06f3db7 commit 8e45b5a

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

tck/src/main/java/org/eclipse/microprofile/openapi/tck/AppTestBase.java

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,12 @@ public abstract class AppTestBase extends Arquillian {
4141
private static final String DEFAULT_HOST = "localhost";
4242
private static final int DEFAULT_PORT = 9080;
4343

44-
private static String serverUrl;
45-
private static String username;
46-
private static String password;
47-
4844
protected static final Filter YAML_FILTER = new YamlToJsonFilter();
4945

5046
@BeforeClass
51-
public static void configureRestAssured() throws MalformedURLException {
47+
public void configureRestAssured() throws MalformedURLException {
5248
// set base URI and port number to use for all requests
53-
serverUrl = System.getProperty("test.url");
49+
String serverUrl = System.getProperty("test.url");
5450
String protocol = DEFAULT_PROTOCOL;
5551
String host = DEFAULT_HOST;
5652
int port = DEFAULT_PORT;
@@ -65,8 +61,8 @@ public static void configureRestAssured() throws MalformedURLException {
6561
RestAssured.baseURI = protocol + "://" + host;
6662
RestAssured.port = port;
6763

68-
username = System.getProperty("test.user");
69-
password = System.getProperty("test.pwd");
64+
String username = System.getProperty("test.user");
65+
String password = System.getProperty("test.pwd");
7066

7167
if (username != null && password != null) {
7268
RestAssured.authentication = RestAssured.basic(username, password);

0 commit comments

Comments
 (0)