You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@unomi.apache.org by sh...@apache.org on 2020/08/24 12:54:19 UTC

[unomi] branch master updated: Fix errors in unit test

This is an automated email from the ASF dual-hosted git repository.

shuber 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 6b2da76  Fix errors in unit test
6b2da76 is described below

commit 6b2da760f8719492c64028129d459bc2720e42af
Author: Serge Huber <sh...@jahia.com>
AuthorDate: Mon Aug 24 14:54:12 2020 +0200

    Fix errors in unit test
---
 .../src/test/java/org/apache/unomi/itests/ContextServletIT.java   | 8 ++++----
 itests/src/test/java/org/apache/unomi/itests/EventServiceIT.java  | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/itests/src/test/java/org/apache/unomi/itests/ContextServletIT.java b/itests/src/test/java/org/apache/unomi/itests/ContextServletIT.java
index 812f36c..a6dff7b 100644
--- a/itests/src/test/java/org/apache/unomi/itests/ContextServletIT.java
+++ b/itests/src/test/java/org/apache/unomi/itests/ContextServletIT.java
@@ -124,7 +124,7 @@ public class ContextServletIT extends BaseIT {
 	@Test
 	public void testUpdateEventFromContextAuthorizedThirdParty_Success() throws IOException, InterruptedException {
 		//Arrange
-		String eventId = "test-event-id1";
+		String eventId = "test-event-id-" + System.currentTimeMillis();
 		String profileId = "test-profile-id";
 		String sessionId = "test-session-id";
 		String scope = "test-scope";
@@ -159,7 +159,7 @@ public class ContextServletIT extends BaseIT {
 	@Test
 	public void testUpdateEventFromContextUnAuthorizedThirdParty_Fail() throws IOException, InterruptedException {
 		//Arrange
-		String eventId = "test-event-id2";
+		String eventId = "test-event-id-" + System.currentTimeMillis();
 		String profileId = "test-profile-id";
 		String sessionId = "test-session-id";
 		String scope = "test-scope";
@@ -194,7 +194,7 @@ public class ContextServletIT extends BaseIT {
 	@Test
 	public void testUpdateEventFromContextAuthorizedThirdPartyNoItemID_Fail() throws IOException, InterruptedException {
 		//Arrange
-		String eventId = "test-event-id3";
+		String eventId = "test-event-id-" + System.currentTimeMillis();
 		String sessionId = "test-session-id";
 		String scope = "test-scope";
 		String eventTypeOriginal = "test-event-type-original";
@@ -320,7 +320,7 @@ public class ContextServletIT extends BaseIT {
 	@Test
 	public void testCreateEventWithProfileId_Success() throws IOException, InterruptedException {
 		//Arrange
-		String eventId = "test-event-id4";
+		String eventId = "test-event-id-" + System.currentTimeMillis();
 		String profileId = "test-profile-id";
 		String eventType = "test-event-type";
 		Event event = new Event();
diff --git a/itests/src/test/java/org/apache/unomi/itests/EventServiceIT.java b/itests/src/test/java/org/apache/unomi/itests/EventServiceIT.java
index 160205a..5e38d19 100644
--- a/itests/src/test/java/org/apache/unomi/itests/EventServiceIT.java
+++ b/itests/src/test/java/org/apache/unomi/itests/EventServiceIT.java
@@ -52,7 +52,7 @@ public class EventServiceIT extends BaseIT {
 
     @Test
     public void test_EventExistenceWithProfileId() throws InterruptedException{
-        String eventId = "test-event-id2";
+        String eventId = "test-event-id-" + System.currentTimeMillis();;
         String profileId = "test-profile-id";
         String eventType = "test-type";
         Profile profile = new Profile(profileId);