sergehuber commented on code in PR #449:
URL: https://github.com/apache/unomi/pull/449#discussion_r909377928
##########
itests/src/test/java/org/apache/unomi/itests/InputValidationIT.java:
##########
@@ -59,6 +64,26 @@ public class InputValidationIT extends BaseIT {
@Filter(timeout = 600000)
protected SchemaService schemaService;
+ @Inject
+ @Filter(timeout = 600000)
+ protected ScopeService scopeService;
+
+ @Before
+ public void setUp() {
+ Scope scope = new Scope();
+ scope.setItemId("dummy_scope");
+ Metadata metadata = new Metadata();
+ metadata.setName("Dummy scope");
+ metadata.setId("dummy_scope");
Review Comment:
Same comment here about TestUtils.newScope(String scopeId)
##########
itests/src/test/java/org/apache/unomi/itests/BasicIT.java:
##########
@@ -93,6 +97,27 @@ public class BasicIT extends BaseIT {
@Inject @Filter(timeout = 600000)
protected DefinitionsService definitionsService;
+ @Inject @Filter(timeout = 600000)
+ protected ScopeService scopeService;
+
+ @Before
+ public void setUp() throws InterruptedException {
+ Scope scope = new Scope();
+ scope.setItemId(TEST_SCOPE);
+ Metadata metadata = new Metadata();
+ metadata.setName("Test scope");
+ metadata.setId(TEST_SCOPE);
+ scope.setMetadata(metadata);
Review Comment:
Maybe we could refactor this creation to TestUtils.newScope(String scopeId)
as we use it multiple times in the tests ?
##########
itests/src/test/java/org/apache/unomi/itests/JSONSchemaIT.java:
##########
@@ -61,15 +64,27 @@ public class JSONSchemaIT extends BaseIT {
@Filter(timeout = 600000)
protected SchemaService schemaService;
+ @Inject
+ @Filter(timeout = 6000000)
+ protected ScopeService scopeService;
+
@Before
public void setUp() throws InterruptedException {
keepTrying("Couldn't find json schema endpoint", () ->
get(JSONSCHEMA_URL, List.class), Objects::nonNull, DEFAULT_TRYING_TIMEOUT,
DEFAULT_TRYING_TRIES);
+
+ Scope scope = new Scope();
+ scope.setItemId("dummy_scope");
+ Metadata metadata = new Metadata();
+ metadata.setName("Dummy scope");
+ metadata.setId("dummy_scope");
+ scope.setMetadata(metadata);
Review Comment:
Same comment here about TestUtils.newScope(String scopeId)
##########
itests/src/test/java/org/apache/unomi/itests/ContextServletIT.java:
##########
@@ -145,6 +152,16 @@ public void setUp() throws InterruptedException {
(schemaIds) ->
(schemaIds.contains("https://unomi.apache.org/schemas/json/events/floatPropertyType/1-0-0")
&&
schemaIds.contains("https://unomi.apache.org/schemas/json/events/testEventType/1-0-0")),
DEFAULT_TRYING_TIMEOUT, DEFAULT_TRYING_TRIES);
+
+ Scope scope = new Scope();
+ scope.setItemId(TEST_SCOPE);
+ Metadata metadata = new Metadata();
+ metadata.setName("Test scope");
+ metadata.setId(TEST_SCOPE);
+ scope.setMetadata(metadata);
Review Comment:
Same comment here about TestUtils.newScope(String scopeId)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]