Skip to content

Commit f4c2754

Browse files
committed
Revert "fix: kill ES container immediately in testStopESContainer to prevent graceful-shutdown race"
This reverts commit ff3e55e.
1 parent 4f05516 commit f4c2754

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

src/test/java/io/confluent/connect/elasticsearch/integration/ElasticsearchConnectorIT.java

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -202,14 +202,8 @@ public void testStopESContainer() throws Exception {
202202
// run connector and write
203203
runSimpleTest(props);
204204

205-
// Kill ES immediately (SIGKILL, timeout=0) so it cannot process any more requests.
206-
// container.stop() sends SIGTERM and returns before ES dies — ES takes up to 10s
207-
// to gracefully shut down, during which bulk requests still succeed and no error
208-
// is set. Using withTimeout(0) forces Docker to send SIGKILL immediately.
209-
container.getDockerClient()
210-
.stopContainerCmd(container.getContainerId())
211-
.withTimeout(0)
212-
.exec();
205+
// stop ES, for all following requests to fail with "connection refused"
206+
container.stop();
213207

214208
// try to write some more
215209
writeRecords(NUM_RECORDS);

0 commit comments

Comments
 (0)