Skip to content

Commit 6027c3b

Browse files
committed
test: remove excessive static modifiers from test methods
1 parent 1ebaf93 commit 6027c3b

2 files changed

Lines changed: 18 additions & 18 deletions

File tree

src/protocol/http/src/test/java/org/apache/jmeter/protocol/http/proxy/TestHttpRequestHdr.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -196,19 +196,19 @@ public void testRepeatedArguments() throws Exception {
196196
}
197197

198198
@Test
199-
public static void testEncodedArguments() throws Exception {
199+
public void testEncodedArguments() throws Exception {
200200
String url = "http://localhost/matrix.html";
201201
testEncodedArguments(url);
202202
}
203203

204204

205205
@Test
206-
public static void testEncodedArgumentsIPv6() throws Exception {
206+
public void testEncodedArgumentsIPv6() throws Exception {
207207
String url = "http://[::1]:8080/matrix.html";
208208
testEncodedArguments(url);
209209
}
210210

211-
private static void testEncodedArguments(String url) throws Exception {
211+
private void testEncodedArguments(String url) throws Exception {
212212
// A HTTP GET request, with encoding not known
213213
String contentEncoding = "";
214214
String queryString = "abc%3FSPACE=a+b&space=a%20b&query=What%3F";
@@ -309,12 +309,12 @@ private static void testEncodedArguments(String url) throws Exception {
309309
}
310310

311311
@Test
312-
public static void testGetRequestEncodings() throws Exception {
312+
public void testGetRequestEncodings() throws Exception {
313313
testGetRequestEncodings("http://localhost/matrix.html");
314314
}
315315

316316
@Test
317-
public static void testGetRequestEncodingsIPv6() throws Exception {
317+
public void testGetRequestEncodingsIPv6() throws Exception {
318318
testGetRequestEncodings("http://[::1]:8080/matrix.html");
319319
}
320320

src/protocol/http/src/test/java/org/apache/jmeter/protocol/http/sampler/TestHTTPSamplersAgainstHttpMirrorServer.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -109,72 +109,72 @@ static void setup() throws IOException {
109109

110110
@ParameterizedTest
111111
@ValueSource(ints = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10})
112-
public static void itemised_testPostRequest_UrlEncoded(int item) throws Exception {
112+
public void itemised_testPostRequest_UrlEncoded(int item) throws Exception {
113113
testPostRequest_UrlEncoded(HTTP_SAMPLER, ISO_8859_1, item);
114114
}
115115

116116
@ParameterizedTest
117117
@ValueSource(ints = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10})
118-
public static void itemised_testPostRequest_UrlEncoded3(int item) throws Exception {
118+
public void itemised_testPostRequest_UrlEncoded3(int item) throws Exception {
119119
testPostRequest_UrlEncoded(HTTP_SAMPLER3, US_ASCII, item);
120120
}
121121

122122
@Test
123-
public static void testPostRequest_FormMultipart_0() throws Exception {
123+
public void testPostRequest_FormMultipart_0() throws Exception {
124124
testPostRequest_FormMultipart(HTTP_SAMPLER);
125125
}
126126

127127
@Test
128-
public static void testPostRequest_FormMultipart3() throws Exception {
128+
public void testPostRequest_FormMultipart3() throws Exception {
129129
// see https://issues.apache.org/jira/browse/HTTPCLIENT-1665
130130
testPostRequest_FormMultipart(HTTP_SAMPLER3);
131131
}
132132

133133
@Test
134-
public static void testPostRequest_FileUpload() throws Exception {
134+
public void testPostRequest_FileUpload() throws Exception {
135135
testPostRequest_FileUpload(HTTP_SAMPLER);
136136
}
137137

138138
@Test
139-
public static void testPostRequest_FileUpload3() throws Exception {
139+
public void testPostRequest_FileUpload3() throws Exception {
140140
// see https://issues.apache.org/jira/browse/HTTPCLIENT-1665
141141
testPostRequest_FileUpload(HTTP_SAMPLER3);
142142
}
143143

144144
@Test
145-
public static void testPostRequest_BodyFromParameterValues() throws Exception {
145+
public void testPostRequest_BodyFromParameterValues() throws Exception {
146146
testPostRequest_BodyFromParameterValues(HTTP_SAMPLER, ISO_8859_1);
147147
}
148148

149149
@Test
150-
public static void testPostRequest_BodyFromParameterValues3() throws Exception {
150+
public void testPostRequest_BodyFromParameterValues3() throws Exception {
151151
testPostRequest_BodyFromParameterValues(HTTP_SAMPLER3, US_ASCII);
152152
}
153153

154154
@Test
155-
public static void testGetRequest() throws Exception {
155+
public void testGetRequest() throws Exception {
156156
testGetRequest(HTTP_SAMPLER);
157157
}
158158

159159
@Test
160-
public static void testGetRequest3() throws Exception {
160+
public void testGetRequest3() throws Exception {
161161
testGetRequest(HTTP_SAMPLER3);
162162
}
163163

164164
@ParameterizedTest
165165
@ValueSource(ints = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10})
166-
public static void itemised_testGetRequest_Parameters(int item) throws Exception {
166+
public void itemised_testGetRequest_Parameters(int item) throws Exception {
167167
testGetRequest_Parameters(HTTP_SAMPLER, item);
168168
}
169169

170170
@ParameterizedTest
171171
@ValueSource(ints = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10})
172-
public static void itemised_testGetRequest_Parameters3(int item) throws Exception {
172+
public void itemised_testGetRequest_Parameters3(int item) throws Exception {
173173
testGetRequest_Parameters(HTTP_SAMPLER3, item);
174174
}
175175

176176
@Test
177-
public static void testPutRequest_BodyFromParameterValues3() throws Exception {
177+
public void testPutRequest_BodyFromParameterValues3() throws Exception {
178178
testPutRequest_BodyFromParameterValues(HTTP_SAMPLER3, US_ASCII);
179179
}
180180

0 commit comments

Comments
 (0)