Skip to content

Commit 69a735f

Browse files
authored
fix: Failing testBackfillOnDemand After Publisher Correctly Closes Handler Connection (#1515)
* Fix simulator reuses closed pipeline to send messages * Re-enabled E2E test: `testBacfkillOnDemand` Signed-off-by: Atanas Atanasov <a.v.atanasov98@gmail.com>
1 parent dffea69 commit 69a735f

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

tools-and-tests/simulator/src/main/java/org/hiero/block/simulator/mode/impl/PublishClientManager.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,17 +80,15 @@ public void handleResponse(Block nextBlock, PublishStreamResponse publishStreamR
8080

8181
private void handleEndStream(Block nextBlock, PublishStreamResponse publishStreamResponse)
8282
throws InterruptedException, BlockSimulatorParsingException, IOException {
83+
stop();
84+
adjustStreamManager(nextBlock, publishStreamResponse);
85+
initializeNewClientAndHandler();
8386
if (publishStreamResponse.getEndStream().getStatus() == Code.BEHIND) {
8487
if (blockStreamConfig.endStreamMode() == TOO_FAR_BEHIND) {
8588
currentClient.handleEndStreamModeIfSet();
8689
return;
8790
}
8891
}
89-
90-
stop();
91-
adjustStreamManager(nextBlock, publishStreamResponse);
92-
initializeNewClientAndHandler();
93-
9492
start();
9593
}
9694

tools-and-tests/suites/src/main/java/org/hiero/block/suites/publisher/positive/PositiveMultiplePublishersTests.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,7 @@ void teardownEnvironment() {
6464
simulators.clear();
6565
}
6666

67-
// @todo(1498)
6867
@Test
69-
@Disabled("@todo(1498) - the test is disabled because failure is seen after block node closes connection correctly")
7068
@DisplayName("Publisher should send TOO_FAR_BEHIND to activate backfill on demand")
7169
@Timeout(30)
7270
public void testBackfillOnDemand() throws IOException, InterruptedException {

0 commit comments

Comments
 (0)