This is an automated email from the ASF dual-hosted git repository.
jkevan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/unomi.git
The following commit(s) were added to refs/heads/master by this push:
new 1e5278f UNOMI-419: fix SegmentsIT test to wait on full startup (#256)
1e5278f is described below
commit 1e5278fe5e1394158ff32c58bdae343b36c291ba
Author: kevan Jahanshahi <[email protected]>
AuthorDate: Wed Feb 24 15:15:21 2021 +0100
UNOMI-419: fix SegmentsIT test to wait on full startup (#256)
---
itests/src/test/java/org/apache/unomi/itests/SegmentIT.java | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/itests/src/test/java/org/apache/unomi/itests/SegmentIT.java
b/itests/src/test/java/org/apache/unomi/itests/SegmentIT.java
index fceb70c..1ca2e8b 100644
--- a/itests/src/test/java/org/apache/unomi/itests/SegmentIT.java
+++ b/itests/src/test/java/org/apache/unomi/itests/SegmentIT.java
@@ -22,6 +22,7 @@ import org.apache.unomi.api.conditions.Condition;
import org.apache.unomi.api.segments.Segment;
import org.apache.unomi.api.services.SegmentService;
import org.apache.unomi.api.exceptions.BadSegmentConditionException;
+import org.apache.unomi.lifecycle.BundleWatcher;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
@@ -46,8 +47,15 @@ public class SegmentIT extends BaseIT {
@Filter(timeout = 600000)
protected SegmentService segmentService;
+ @Inject @Filter(timeout = 600000)
+ protected BundleWatcher bundleWatcher;
+
@Before
public void setUp() throws InterruptedException {
+ while (!bundleWatcher.isStartupComplete()) {
+ LOGGER.info("Waiting for startup to complete...");
+ Thread.sleep(1000);
+ }
removeItems(Segment.class);
}