-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1196 from michalvavrik/feature/workaround-groovy-…
…conflict Workaround Groovy conflicts in Debug examples as daily build is failing
- Loading branch information
Showing
3 changed files
with
66 additions
and
26 deletions.
There are no files selected for viewing
24 changes: 17 additions & 7 deletions
24
...rc/test/resources-filtered/project/classic/src/test/java/io/quarkus/qe/debug/HelloIT.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,30 @@ | ||
package io.quarkus.qe.debug; | ||
|
||
import io.quarkus.test.bootstrap.RestService; | ||
import io.quarkus.test.scenarios.QuarkusScenario; | ||
import io.restassured.RestAssured; | ||
import org.hamcrest.Matchers; | ||
import io.quarkus.test.services.QuarkusApplication; | ||
import io.vertx.mutiny.ext.web.client.HttpResponse; | ||
import io.vertx.mutiny.ext.web.client.predicate.ResponsePredicate; | ||
import org.junit.jupiter.api.Test; | ||
|
||
import java.net.HttpURLConnection; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
|
||
@QuarkusScenario | ||
public class HelloIT { | ||
|
||
@QuarkusApplication | ||
static final RestService app = new RestService(false); | ||
|
||
@Test | ||
public void test() { | ||
RestAssured | ||
.get("/hello") | ||
.then() | ||
.statusCode(200) | ||
.body(Matchers.is("hello")); | ||
String response = app.mutiny().get("/hello") | ||
.expect(ResponsePredicate.status(HttpURLConnection.HTTP_OK)) | ||
.send() | ||
.map(HttpResponse::bodyAsString) | ||
.await().indefinitely(); | ||
assertEquals("hello", response); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters