Skip to content

Handle Server 2.10.26 returns No Responders instead of timeouts. #1292

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Mar 19, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
self-review
  • Loading branch information
scottf committed Mar 19, 2025
commit cd59eba7c5805404d3b04e6d5872e0c31cb1faaa
3 changes: 1 addition & 2 deletions src/main/java/io/nats/client/BaseConsumeOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,10 @@ protected BaseConsumeOptions(Builder b) {
messages = b.messages < 0 ? DEFAULT_MESSAGE_COUNT : b.messages;
}

this.raiseStatusWarnings = b.raiseStatusWarnings;

// validation handled in builder
thresholdPercent = b.thresholdPercent;
noWait = b.noWait;
raiseStatusWarnings = b.raiseStatusWarnings;

// if it's not noWait, it must have an expiresIn
// we can't check this in the builder because we can't guarantee order
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1548,14 +1548,14 @@ public void testCreateConsumerUpdateConsumer() throws Exception {
}

@Test
public void test1026() throws Exception {
public void testNoRespondersWhenConsumerDeleted() throws Exception {
ListenerForTesting listener = new ListenerForTesting();
jsServer.run(new Options.Builder().errorListener(listener), TestBase::atLeast2_10_26, nc -> {
JetStreamManagement jsm = nc.jetStreamManagement();
JetStream js = nc.jetStream();

String stream = stream();
String subject = stream();
String subject = subject();

assertThrows(JetStreamApiException.class, () -> jsm.getMessage(stream, 1));

Expand Down Expand Up @@ -1603,7 +1603,6 @@ public void test1026() throws Exception {
assertEquals(0, count.get());
validate1026(null, listener, true);


context = setupFor1026Simplification(nc, jsm, listener, stream, subject);
//noinspection resource
context.consume(ConsumeOptions.builder().raiseStatusWarnings().build(), handler);
Expand All @@ -1613,9 +1612,9 @@ public void test1026() throws Exception {
});
}

private static void validate1026(Message m, ListenerForTesting listener, boolean empty) throws InterruptedException {
private static void validate1026(Message m, ListenerForTesting listener, boolean empty) {
assertNull(m);
Thread.sleep(100); // give time for the message to get there
sleep(100); // give time for the message to get there
assertEquals(empty, listener.getPullStatusWarnings().isEmpty());
}

Expand Down
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy