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 bf89b28696cd41e64e3316d57585a8c09d836e4a Author: wangkai <wang...@zhongan.com> AuthorDate: Mon Oct 23 21:01:17 2023 +0800 [e2eTest] add e2eTest model --- pom.xml | 3 +++ test/rocketmq-eventbridge-e2etest/pom.xml | 20 ++++++++++++++++++++ .../controller/ApplicationTagControllerTest.java | 14 +++++++------- 3 files changed, 30 insertions(+), 7 deletions(-) diff --git a/pom.xml b/pom.xml index b60d031..7854332 100644 --- a/pom.xml +++ b/pom.xml @@ -105,6 +105,9 @@ <module>domain</module> <module>common</module> <module>infrastructure</module> + <module>supports/connect-eventbridge-transform</module> + <module>supports/connect-filter-transform</module> + <module>supports/eventbridge-connect-file</module> <module>test</module> <module>dist</module> </modules> diff --git a/test/rocketmq-eventbridge-e2etest/pom.xml b/test/rocketmq-eventbridge-e2etest/pom.xml index ac82308..e5abdb9 100644 --- a/test/rocketmq-eventbridge-e2etest/pom.xml +++ b/test/rocketmq-eventbridge-e2etest/pom.xml @@ -44,6 +44,26 @@ </exclusion> </exclusions> </dependency> + <dependency> + <groupId>org.apache.rocketmq</groupId> + <artifactId>connect-eventbridge-transform</artifactId> + <version>1.0.0-SNAPSHOT</version> + </dependency> + <dependency> + <groupId>org.apache.rocketmq</groupId> + <artifactId>connect-eventbridge-transform</artifactId> + <version>1.0.0-SNAPSHOT</version> + </dependency> + <dependency> + <groupId>org.apache.rocketmq</groupId> + <artifactId>connect-filter-transform</artifactId> + <version>1.0.0-SNAPSHOT</version> + </dependency> + <dependency> + <groupId>org.apache.rocketmq</groupId> + <artifactId>eventbridge-connect-file</artifactId> + <version>1.0.0-SNAPSHOT</version> + </dependency> </dependencies> </project> \ No newline at end of file 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 bac500b..7998783 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 @@ -2,6 +2,7 @@ package org.apache.rocketmq.eventbridge.e2etest.controller; import lombok.extern.slf4j.Slf4j; import org.apache.commons.io.FileUtils; +import org.apache.commons.lang3.StringUtils; import org.apache.rocketmq.eventbridge.Main; import org.apache.rocketmq.eventbridge.e2etest.BaseTest; import org.apache.rocketmq.eventbridge.e2etest.util.Utils; @@ -39,19 +40,18 @@ 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(System.getProperty("user.home") + "/demo"); String data = null; - long current = System.currentTimeMillis(); - while((System.currentTimeMillis() - current)/1000 <300 ) { + int retries = 0; + while( retries < 10 ) { data = FileUtils.readFileToString(file, "UTF-8"); - if (data != null) { + if (StringUtils.isNotBlank(data)) { + Assert.assertEquals("A test recrod.\n", data); break; } - Thread.sleep(1000); + Thread.sleep(50000); + retries++; } - - Assert.assertEquals("A test recrod.\n", data); }