This is an automated email from the ASF dual-hosted git repository. shenlin pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/rocketmq-eventbridge.git
commit 149b0112845f7a4347e8bded9e62307b534b4696 Author: wangkai <wang...@zhongan.com> AuthorDate: Fri Nov 3 14:18:41 2023 +0800 [e2eTest] add e2eTest model --- .../src/main/java/org/apache/rocketmq/connect/sink/FileSinkTask.java | 1 + .../eventbridge/e2etest/controller/ApplicationTagControllerTest.java | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/supports/eventbridge-connect-file/src/main/java/org/apache/rocketmq/connect/sink/FileSinkTask.java b/supports/eventbridge-connect-file/src/main/java/org/apache/rocketmq/connect/sink/FileSinkTask.java index 39526cd..197e34e 100644 --- a/supports/eventbridge-connect-file/src/main/java/org/apache/rocketmq/connect/sink/FileSinkTask.java +++ b/supports/eventbridge-connect-file/src/main/java/org/apache/rocketmq/connect/sink/FileSinkTask.java @@ -44,6 +44,7 @@ public class FileSinkTask extends SinkTask { throw new ConnectException("Write record to file failed.", e); } } + outputStream.flush(); } diff --git a/test/rocketmq-eventbridge-e2etest/src/test/java/org/apache/rocketmq/eventbridge/e2etest/controller/ApplicationTagControllerTest.java b/test/rocketmq-eventbridge-e2etest/src/test/java/org/apache/rocketmq/eventbridge/e2etest/controller/ApplicationTagControllerTest.java index e2f6b42..562e4cd 100644 --- a/test/rocketmq-eventbridge-e2etest/src/test/java/org/apache/rocketmq/eventbridge/e2etest/controller/ApplicationTagControllerTest.java +++ b/test/rocketmq-eventbridge-e2etest/src/test/java/org/apache/rocketmq/eventbridge/e2etest/controller/ApplicationTagControllerTest.java @@ -40,7 +40,7 @@ public class ApplicationTagControllerTest extends BaseTest { ResponseEntity<Void> response = Utils.request(template, url, HttpMethod.POST, "A test recrod.", Void.class, headers); Assert.assertTrue(response.getStatusCode().is2xxSuccessful()); - File file = new File("/home/runner/demo"); + File file = new File(System.getProperty("user.home") +"/demo"); String data = null; int retries = 0; while( retries < 10 ) { @@ -48,7 +48,7 @@ public class ApplicationTagControllerTest extends BaseTest { if (StringUtils.isNotBlank(data)) { break; } - Thread.sleep(50000); + Thread.sleep(5000); retries++; } Assert.assertEquals("A test recrod.\n", data);