Skip to content
This repository was archived by the owner on Sep 18, 2023. It is now read-only.

Commit

Permalink
Merge pull request #164 from pjgg/feature/qpid-flakiness
Browse files Browse the repository at this point in the history
qpid flakiness improvements:
  • Loading branch information
mjurc authored Jan 22, 2021
2 parents e51bb3c + 6c00489 commit 97a030a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public void run() {
JMSConsumer consumer = context.createConsumer(context.createQueue("prices"));
while (true) {
Message message = consumer.receive();
if (message == null) return;
if (message == null && (lastPrice != null || !lastPrice.isEmpty())) return;
lastPrice = message.getBody(String.class);
}
} catch (JMSException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class PriceProducer implements Runnable {
private final ScheduledExecutorService scheduler = Executors.newSingleThreadScheduledExecutor();

void onStart(@Observes StartupEvent ev) {
scheduler.scheduleWithFixedDelay(this, 0L, 5L, TimeUnit.SECONDS);
scheduler.scheduleWithFixedDelay(this, 0L, 500L, TimeUnit.MILLISECONDS);
}

void onStop(@Observes ShutdownEvent ev) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public abstract class AbstractQPIDTest {
@Test
@Order(1)
public void testLastPrice() {
await().atMost(60, TimeUnit.SECONDS).untilAsserted(() -> {
await().atMost(3, TimeUnit.MINUTES).untilAsserted(() -> {
String value =
when()
.get("/prices/last")
Expand Down

0 comments on commit 97a030a

Please sign in to comment.