Skip to content

Commit

Permalink
Make all multipart methods blocking
Browse files Browse the repository at this point in the history
  • Loading branch information
fedinskiy committed Jun 13, 2022
1 parent 61b5890 commit ca19203
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@ public interface FileClient {
@Consumes(MediaType.MULTIPART_FORM_DATA)
@Produces(MediaType.TEXT_PLAIN)
@Path("/upload-multipart")
Uni<String> sendMultipart(@MultipartForm FileWrapper data);
String sendMultipart(@MultipartForm FileWrapper data);

}
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public Uni<String> downloadMultipartResponse() {
@POST
@Path("/multipart")
@Blocking
public Uni<String> uploadMultipart() {
public String uploadMultipart() {
FileWrapper wrapper = new FileWrapper();
wrapper.file = file.toFile();
wrapper.name = file.toString();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ public Uni<String> upload(File body) {
@Produces(MediaType.TEXT_PLAIN)
@Path("/upload-multipart")
@Blocking
public Uni<String> uploadMultipart(@MultipartForm FileWrapper body) {
public String uploadMultipart(@MultipartForm FileWrapper body) {
deathRow.add(body.file);
return Uni.createFrom().item(() -> utils.getSum(body.file.getAbsoluteFile().toPath()));
return utils.getSum(body.file.getAbsoluteFile().toPath());
}

@GET
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ public void uploadFileThroughClient() {

@Test
@DisabledOnOs(value = OS.WINDOWS, disabledReason = "https://github.com/quarkusio/quarkus/issues/24763")
@Disabled("https://github.com/quarkus-qe/quarkus-test-suite/issues/707")
public void uploadMultipart() {
Response hashSum = app.given().get("/file-client/client-hash");
assertEquals(HttpStatus.SC_OK, hashSum.statusCode());
Expand Down

0 comments on commit ca19203

Please sign in to comment.