Skip to content

Commit

Permalink
Merge pull request #43427 from cescoffier/attempt-to-fix-24378
Browse files Browse the repository at this point in the history
  • Loading branch information
cescoffier authored Sep 22, 2024
2 parents 1453cd3 + 84e0a0d commit 4283b2f
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import org.jboss.shrinkwrap.api.asset.StringAsset;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;

Expand Down Expand Up @@ -43,7 +42,6 @@ public JavaArchive get() {

//see https://github.com/quarkusio/quarkus/issues/19180
@Test
@Disabled("flaky")
public void testContinuousTestingScenario1() {
ContinuousTestingTestUtils utils = new ContinuousTestingTestUtils();
var result = utils.waitForNextCompletion();
Expand All @@ -68,7 +66,6 @@ public void testContinuousTestingScenario1() {
}

@Test
@Disabled("flaky")
public void testContinuousTestingScenario2() {
ContinuousTestingTestUtils utils = new ContinuousTestingTestUtils();
var result = utils.waitForNextCompletion();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import org.jboss.shrinkwrap.api.asset.StringAsset;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;

Expand Down Expand Up @@ -38,7 +37,6 @@ public JavaArchive get() {
* See https://github.com/quarkusio/quarkus/issues/19180.
*/
@Test
@Disabled("flaky")
public void testContinuousTestingScenario3() {
ContinuousTestingTestUtils utils = new ContinuousTestingTestUtils();
var result = utils.waitForNextCompletion();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package io.quarkus.smallrye.reactivemessaging.kafka.deployment.testing;

import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;

//
//import org.eclipse.microprofile.reactive.messaging.Channel;
//import org.reactivestreams.Publisher;
Expand All @@ -9,8 +12,14 @@
//import jakarta.ws.rs.Produces;
//import jakarta.ws.rs.core.MediaType;
//
//@Path("/prices")
@Path("/prices")
public class PriceResource {

@GET
public String ok() {
return "ok";
}

// private final Publisher<Double> processedPrices;
//
// public PriceResource(@Channel("processed-prices") Publisher<Double> processedPrices) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package io.quarkus.smallrye.reactivemessaging.kafka.deployment.testing;

import java.net.URI;
import java.time.Duration;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
Expand All @@ -14,20 +13,20 @@
import org.awaitility.Awaitility;
import org.junit.jupiter.api.Test;

import io.quarkus.test.common.http.TestHTTPEndpoint;
import io.quarkus.test.common.http.TestHTTPResource;
import io.quarkus.test.junit.QuarkusTest;
import io.restassured.RestAssured;

@QuarkusTest
class PriceResourceET {
@TestHTTPEndpoint(PriceResource.class)
@TestHTTPResource("/stream")
URI uri;

@Test
public void sseStream() {
Awaitility.await().untilAsserted(() -> {
RestAssured.get("http://localhost:8081/prices").then().statusCode(200);
});

Client client = ClientBuilder.newClient();
WebTarget target = client.target(this.uri);
WebTarget target = client.target("http://localhost:8081/prices/stream");

List<Double> received = new CopyOnWriteArrayList<>();

Expand Down

0 comments on commit 4283b2f

Please sign in to comment.