You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampipes.apache.org by bo...@apache.org on 2022/12/12 17:16:47 UTC
[streampipes] 01/04: add checkstyle to streampipes-test-utils
This is an automated email from the ASF dual-hosted git repository.
bossenti pushed a commit to branch checkstyl-enablements
in repository https://gitbox.apache.org/repos/asf/streampipes.git
commit 182448611b9f0bc04df512c7825c9b1bd463c47d
Author: bossenti <bo...@posteo.de>
AuthorDate: Mon Dec 12 18:10:14 2022 +0100
add checkstyle to streampipes-test-utils
---
streampipes-test-utils/pom.xml | 13 ++++++++---
.../test/generator/EventStreamGenerator.java | 10 ++++-----
.../test/generator/InvocationGraphGenerator.java | 3 ++-
.../generator/pipeline/DummyPipelineGenerator.java | 26 +++++++++++-----------
.../pipelineelement/DummyProcessorGenerator.java | 10 ++++-----
.../pipelineelement/DummySinkGenerator.java | 10 ++++-----
.../pipelineelement/DummyStreamGenerator.java | 24 ++++++++++----------
7 files changed, 52 insertions(+), 44 deletions(-)
diff --git a/streampipes-test-utils/pom.xml b/streampipes-test-utils/pom.xml
index 65f9dfbbb..5c1bccd45 100644
--- a/streampipes-test-utils/pom.xml
+++ b/streampipes-test-utils/pom.xml
@@ -17,7 +17,8 @@
~
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>streampipes-parent</artifactId>
<groupId>org.apache.streampipes</groupId>
@@ -42,6 +43,12 @@
<scope>test</scope>
</dependency>
</dependencies>
-
-
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
</project>
diff --git a/streampipes-test-utils/src/main/java/org/apache/streampipes/test/generator/EventStreamGenerator.java b/streampipes-test-utils/src/main/java/org/apache/streampipes/test/generator/EventStreamGenerator.java
index c092d53cf..c2ff4612c 100644
--- a/streampipes-test-utils/src/main/java/org/apache/streampipes/test/generator/EventStreamGenerator.java
+++ b/streampipes-test-utils/src/main/java/org/apache/streampipes/test/generator/EventStreamGenerator.java
@@ -40,11 +40,11 @@ public class EventStreamGenerator {
public static SpDataStream makeStreamWithProperties(List<String> runtimeNames) {
SpDataStream stream = makeEmptyStream();
stream
- .getEventSchema()
- .setEventProperties(runtimeNames
- .stream()
- .map(r -> new EventPropertyPrimitive(XSD._integer.toString(), r, "", new ArrayList<>()))
- .collect(Collectors.toList()));
+ .getEventSchema()
+ .setEventProperties(runtimeNames
+ .stream()
+ .map(r -> new EventPropertyPrimitive(XSD._integer.toString(), r, "", new ArrayList<>()))
+ .collect(Collectors.toList()));
return stream;
}
diff --git a/streampipes-test-utils/src/main/java/org/apache/streampipes/test/generator/InvocationGraphGenerator.java b/streampipes-test-utils/src/main/java/org/apache/streampipes/test/generator/InvocationGraphGenerator.java
index 01ac6bc26..35827dcfd 100644
--- a/streampipes-test-utils/src/main/java/org/apache/streampipes/test/generator/InvocationGraphGenerator.java
+++ b/streampipes-test-utils/src/main/java/org/apache/streampipes/test/generator/InvocationGraphGenerator.java
@@ -36,7 +36,8 @@ public class InvocationGraphGenerator {
return invocation;
}
- public static DataProcessorInvocation makeInvocationWithOutputProperties(DataProcessorDescription description, List<String> runtimeNames) {
+ public static DataProcessorInvocation makeInvocationWithOutputProperties(DataProcessorDescription description,
+ List<String> runtimeNames) {
DataProcessorInvocation invocation = makeEmptyInvocation(description);
invocation.setOutputStream(EventStreamGenerator.makeStreamWithProperties(runtimeNames));
diff --git a/streampipes-test-utils/src/main/java/org/apache/streampipes/test/generator/pipeline/DummyPipelineGenerator.java b/streampipes-test-utils/src/main/java/org/apache/streampipes/test/generator/pipeline/DummyPipelineGenerator.java
index 0e5381b42..04b0fec23 100644
--- a/streampipes-test-utils/src/main/java/org/apache/streampipes/test/generator/pipeline/DummyPipelineGenerator.java
+++ b/streampipes-test-utils/src/main/java/org/apache/streampipes/test/generator/pipeline/DummyPipelineGenerator.java
@@ -26,22 +26,22 @@ import org.apache.streampipes.test.generator.pipelineelement.DummyStreamGenerato
import java.util.Collections;
public class DummyPipelineGenerator {
- public static final String PIPELINE_NAME = "Test Pipeline";
+ public static final String PIPELINE_NAME = "Test Pipeline";
- public static Pipeline makePipelineWithPipelineName() {
- Pipeline pipeline = new Pipeline();
- pipeline.setName(PIPELINE_NAME);
+ public static Pipeline makePipelineWithPipelineName() {
+ Pipeline pipeline = new Pipeline();
+ pipeline.setName(PIPELINE_NAME);
- return pipeline;
- }
+ return pipeline;
+ }
- public static Pipeline makePipelineWithProcessorAndSink() {
- Pipeline pipeline = makePipelineWithPipelineName();
+ public static Pipeline makePipelineWithProcessorAndSink() {
+ Pipeline pipeline = makePipelineWithPipelineName();
- pipeline.setStreams(Collections.singletonList(DummyStreamGenerator.makeDummyStream()));
- pipeline.setSepas(Collections.singletonList(DummyProcessorGenerator.makeDummyProcessor()));
- pipeline.setActions(Collections.singletonList(DummySinkGenerator.makeDummySink()));
+ pipeline.setStreams(Collections.singletonList(DummyStreamGenerator.makeDummyStream()));
+ pipeline.setSepas(Collections.singletonList(DummyProcessorGenerator.makeDummyProcessor()));
+ pipeline.setActions(Collections.singletonList(DummySinkGenerator.makeDummySink()));
- return pipeline;
- }
+ return pipeline;
+ }
}
diff --git a/streampipes-test-utils/src/main/java/org/apache/streampipes/test/generator/pipelineelement/DummyProcessorGenerator.java b/streampipes-test-utils/src/main/java/org/apache/streampipes/test/generator/pipelineelement/DummyProcessorGenerator.java
index 2cdda2439..636dd66be 100644
--- a/streampipes-test-utils/src/main/java/org/apache/streampipes/test/generator/pipelineelement/DummyProcessorGenerator.java
+++ b/streampipes-test-utils/src/main/java/org/apache/streampipes/test/generator/pipelineelement/DummyProcessorGenerator.java
@@ -23,11 +23,11 @@ import org.apache.streampipes.model.util.ElementIdGenerator;
public class DummyProcessorGenerator {
- public static DataProcessorInvocation makeDummyProcessor() {
+ public static DataProcessorInvocation makeDummyProcessor() {
- DataProcessorInvocation dataProcessorInvocation = new DataProcessorInvocation();
- dataProcessorInvocation.setElementId(ElementIdGenerator.makeElementId(DataProcessorInvocation.class));
+ DataProcessorInvocation dataProcessorInvocation = new DataProcessorInvocation();
+ dataProcessorInvocation.setElementId(ElementIdGenerator.makeElementId(DataProcessorInvocation.class));
- return dataProcessorInvocation;
- }
+ return dataProcessorInvocation;
+ }
}
diff --git a/streampipes-test-utils/src/main/java/org/apache/streampipes/test/generator/pipelineelement/DummySinkGenerator.java b/streampipes-test-utils/src/main/java/org/apache/streampipes/test/generator/pipelineelement/DummySinkGenerator.java
index b10cdf906..46747a41d 100644
--- a/streampipes-test-utils/src/main/java/org/apache/streampipes/test/generator/pipelineelement/DummySinkGenerator.java
+++ b/streampipes-test-utils/src/main/java/org/apache/streampipes/test/generator/pipelineelement/DummySinkGenerator.java
@@ -22,11 +22,11 @@ import org.apache.streampipes.model.graph.DataSinkInvocation;
import org.apache.streampipes.model.util.ElementIdGenerator;
public class DummySinkGenerator {
- public static DataSinkInvocation makeDummySink() {
+ public static DataSinkInvocation makeDummySink() {
- DataSinkInvocation dataSinkInvocation = new DataSinkInvocation();
- dataSinkInvocation.setElementId(ElementIdGenerator.makeElementId(DataSinkInvocation.class));
+ DataSinkInvocation dataSinkInvocation = new DataSinkInvocation();
+ dataSinkInvocation.setElementId(ElementIdGenerator.makeElementId(DataSinkInvocation.class));
- return dataSinkInvocation;
- }
+ return dataSinkInvocation;
+ }
}
diff --git a/streampipes-test-utils/src/main/java/org/apache/streampipes/test/generator/pipelineelement/DummyStreamGenerator.java b/streampipes-test-utils/src/main/java/org/apache/streampipes/test/generator/pipelineelement/DummyStreamGenerator.java
index 28c59adb1..3aca34fd0 100644
--- a/streampipes-test-utils/src/main/java/org/apache/streampipes/test/generator/pipelineelement/DummyStreamGenerator.java
+++ b/streampipes-test-utils/src/main/java/org/apache/streampipes/test/generator/pipelineelement/DummyStreamGenerator.java
@@ -1,18 +1,18 @@
/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*
*/