You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@unomi.apache.org by dg...@apache.org on 2018/10/19 13:53:04 UTC
incubator-unomi git commit: UNOMI-202 make sure integration test
don't interfere between each other
Repository: incubator-unomi
Updated Branches:
refs/heads/master dede058d6 -> d5c560f39
UNOMI-202 make sure integration test don't interfere between each other
Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/d5c560f3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/d5c560f3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/d5c560f3
Branch: refs/heads/master
Commit: d5c560f39518563c72c83ac34a1e517497dc18a4
Parents: dede058
Author: dgaillard <dg...@jahia.com>
Authored: Fri Oct 19 15:52:54 2018 +0200
Committer: dgaillard <dg...@jahia.com>
Committed: Fri Oct 19 15:52:54 2018 +0200
----------------------------------------------------------------------
.../java/org/apache/unomi/itests/PatchIT.java | 23 +++++++++-----------
itests/src/test/resources/patch1.json | 4 ++--
itests/src/test/resources/patch3.json | 2 +-
3 files changed, 13 insertions(+), 16 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/d5c560f3/itests/src/test/java/org/apache/unomi/itests/PatchIT.java
----------------------------------------------------------------------
diff --git a/itests/src/test/java/org/apache/unomi/itests/PatchIT.java b/itests/src/test/java/org/apache/unomi/itests/PatchIT.java
index 8ed71b8..8016693 100644
--- a/itests/src/test/java/org/apache/unomi/itests/PatchIT.java
+++ b/itests/src/test/java/org/apache/unomi/itests/PatchIT.java
@@ -54,23 +54,21 @@ public class PatchIT extends BaseIT {
@Test
public void testPatch() throws IOException, InterruptedException {
- PropertyType firstName = profileService.getPropertyType("firstName");
+ PropertyType company = profileService.getPropertyType("company");
try {
Patch patch = CustomObjectMapper.getObjectMapper().readValue(bundleContext.getBundle().getResource("patch1.json"), Patch.class);
- PropertyType newFirstName = (PropertyType) patchService.patch(patch);
+ PropertyType newCompany = (PropertyType) patchService.patch(patch);
- Assert.assertEquals("foo", newFirstName.getDefaultValue());
+ Assert.assertEquals("foo", newCompany.getDefaultValue());
Thread.sleep(10000);
- newFirstName = profileService.getPropertyType("firstName");
- Assert.assertEquals("foo", newFirstName.getDefaultValue());
+ newCompany = profileService.getPropertyType("company");
+ Assert.assertEquals("foo", newCompany.getDefaultValue());
} finally {
- profileService.setPropertyType(firstName);
+ profileService.setPropertyType(company);
}
-
-
}
@Test
@@ -90,12 +88,11 @@ public class PatchIT extends BaseIT {
} finally {
profileService.setPropertyType(gender);
}
-
}
@Test
public void testRemove() throws IOException, InterruptedException {
- PropertyType firstName = profileService.getPropertyType("income");
+ PropertyType income = profileService.getPropertyType("income");
try {
Patch patch = CustomObjectMapper.getObjectMapper().readValue(bundleContext.getBundle().getResource("patch3.json"), Patch.class);
@@ -104,10 +101,10 @@ public class PatchIT extends BaseIT {
Thread.sleep(10000);
- PropertyType newFirstName = profileService.getPropertyType("income");
- Assert.assertNull(newFirstName);
+ PropertyType newIncome = profileService.getPropertyType("income");
+ Assert.assertNull(newIncome);
} finally {
- profileService.setPropertyType(firstName);
+ profileService.setPropertyType(income);
}
}
}
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/d5c560f3/itests/src/test/resources/patch1.json
----------------------------------------------------------------------
diff --git a/itests/src/test/resources/patch1.json b/itests/src/test/resources/patch1.json
index bf7f672..acb6b76 100644
--- a/itests/src/test/resources/patch1.json
+++ b/itests/src/test/resources/patch1.json
@@ -1,6 +1,6 @@
{
- "itemId": "firstName-patch1",
- "patchedItemId": "firstName",
+ "itemId": "company-patch1",
+ "patchedItemId": "company",
"patchedItemType": "propertyType",
"operation": "patch",
"data": [
http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/d5c560f3/itests/src/test/resources/patch3.json
----------------------------------------------------------------------
diff --git a/itests/src/test/resources/patch3.json b/itests/src/test/resources/patch3.json
index e2d25fb..fc3ff77 100644
--- a/itests/src/test/resources/patch3.json
+++ b/itests/src/test/resources/patch3.json
@@ -1,5 +1,5 @@
{
- "itemId": "income-patch2",
+ "itemId": "income-patch1",
"patchedItemId": "income",
"patchedItemType": "propertyType",
"operation": "remove"