Skip to content

Commit

Permalink
chore: re-enable test thats no longer flaky
Browse files Browse the repository at this point in the history
  • Loading branch information
matt2e committed Dec 17, 2024
1 parent ca17408 commit 32b91b0
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 8 deletions.
1 change: 1 addition & 0 deletions backend/runner/pubsub/consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ func (c *consumer) ConsumeClaim(session sarama.ConsumerGroupSession, claim saram
for {
err := c.call(ctx, msg.Value, int(msg.Partition), int(msg.Offset))
if err == nil {
logger.Errorf(err, "%s: error consuming message %v:%v", c.verb.Name, msg.Partition, msg.Offset)
break
}
if remainingRetries == 0 {
Expand Down
1 change: 0 additions & 1 deletion backend/runner/pubsub/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import (
)

func TestPubSub(t *testing.T) {
t.Skip("Skipping flaky test")
calls := 20
events := calls * 10
in.Run(t,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ public class Subscriber {

@Subscription(topic = TestTopicTopic.class, from = FromOffset.BEGINNING)
void consume(PubSubEvent event) throws Exception {
Log.infof("Subscriber is consuming %s", event.getTime());
Log.infof("consume: %s", event.getTime());
}

@Subscription(topic = TestTopicTopic.class, from = FromOffset.LATEST)
void consumeFromLatest(PubSubEvent event) throws Exception {
Log.infof("consumeFromLatest: %s", event.getTime());
}

@Subscription(topic = Topic2Topic.class, from = FromOffset.BEGINNING)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@ class Subscriber {
throw RuntimeException("always error: event " + event.time)
}

@Subscription(topic = Topic2Topic::class, from = FromOffset.BEGINNING)
@Retry(count = 1, minBackoff = "1s", maxBackoff = "1s", catchVerb = "catchAny")
fun consumeButFailAndCatchAny(event: PubSubEvent) {
throw RuntimeException("always error: event " + event.time)
}

@Verb
@VerbName("catch")
fun catchVerb(req: CatchRequest<PubSubEvent?>) {
Expand Down

0 comments on commit 32b91b0

Please sign in to comment.