Skip to content

Commit 80bee83

Browse files
committed
Disable test for now, see AsyncHttpClient#1410
1 parent 880a49b commit 80bee83

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

client/src/test/java/org/asynchttpclient/request/body/FastUnauthorizedUploadTest.java renamed to client/src/test/java/org/asynchttpclient/request/body/FastUnauthorizedMultipartTest.java

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
import org.eclipse.jetty.server.handler.AbstractHandler;
3333
import org.testng.annotations.Test;
3434

35-
public class FastUnauthorizedUploadTest extends AbstractBasicTest {
35+
public class FastUnauthorizedMultipartTest extends AbstractBasicTest {
3636

3737
@Override
3838
public AbstractHandler configureHandler() throws Exception {
@@ -49,14 +49,25 @@ public void handle(String target, Request baseRequest, HttpServletRequest req, H
4949
};
5050
}
5151

52-
@Test(groups = "standalone")
53-
public void testUnauthorizedWhileUploading() throws Exception {
52+
@Test(groups = "standalone", enabled = false)
53+
public void testUnauthorizedWhileMultipart() throws Exception {
5454
File file = createTempFile(1024 * 1024);
5555

5656
try (AsyncHttpClient client = asyncHttpClient()) {
57-
Response response = client.preparePut(getTargetUrl()).addBodyPart(new FilePart("test", file, "application/octet-stream", UTF_8)).execute()
58-
.get();
57+
Response response = client.preparePut(getTargetUrl()).addBodyPart(new FilePart("test", file, "application/octet-stream", UTF_8)).execute().get();
5958
assertEquals(response.getStatusCode(), 401);
6059
}
6160
}
61+
62+
public static void main(String[] args) throws Exception {
63+
FastUnauthorizedMultipartTest test = new FastUnauthorizedMultipartTest();
64+
test.setUpGlobal();
65+
try {
66+
for (int i = 0; i < 20; i++) {
67+
test.testUnauthorizedWhileMultipart();
68+
}
69+
} finally {
70+
test.tearDownGlobal();
71+
}
72+
}
6273
}

0 commit comments

Comments
 (0)