Skip to content

Commit c98133b

Browse files
Change surefire naming strategy (#985)
The `surefire` naming strategy for the Java surefire test runner plugin does not work as expected for surefire plugin 3.5.4 and above. This causes warning messages to appear in the test logs, and can compromise the usability of the output. This change use the currently recommended `long` naming strategy. There are some additional minor changes to dependency declarations and docker-compose files to streamline version management and avoid warning messages during test execution. Signed-off-by: Mark S. Lewis <[email protected]>
1 parent 7c8cfd0 commit c98133b

File tree

6 files changed

+17
-11
lines changed

6 files changed

+17
-11
lines changed

java/pom.xml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,19 @@
3939
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
4040
<javaReleaseVersion>8</javaReleaseVersion>
4141
<requireJavaVersion>17</requireJavaVersion>
42-
<bouncyCastleVersion>1.82</bouncyCastleVersion>
4342
<skipUnitTests>${skipTests}</skipUnitTests>
4443
<pmdVersion>7.17.0</pmdVersion>
4544
</properties>
4645

4746
<dependencyManagement>
4847
<dependencies>
48+
<dependency>
49+
<groupId>org.bouncycastle</groupId>
50+
<artifactId>bc-jdk18on-bom</artifactId>
51+
<type>pom</type>
52+
<version>1.82</version>
53+
<scope>import</scope>
54+
</dependency>
4955
<dependency>
5056
<groupId>io.cucumber</groupId>
5157
<artifactId>cucumber-bom</artifactId>
@@ -67,6 +73,13 @@
6773
<type>pom</type>
6874
<scope>import</scope>
6975
</dependency>
76+
<dependency>
77+
<groupId>org.mockito</groupId>
78+
<artifactId>mockito-bom</artifactId>
79+
<type>pom</type>
80+
<version>5.20.0</version>
81+
<scope>import</scope>
82+
</dependency>
7083
<dependency>
7184
<groupId>io.grpc</groupId>
7285
<artifactId>grpc-bom</artifactId>
@@ -104,7 +117,6 @@
104117
<dependency>
105118
<groupId>org.mockito</groupId>
106119
<artifactId>mockito-core</artifactId>
107-
<version>5.20.0</version>
108120
<scope>test</scope>
109121
</dependency>
110122
<dependency>
@@ -120,12 +132,10 @@
120132
<dependency>
121133
<groupId>org.bouncycastle</groupId>
122134
<artifactId>bcpkix-jdk18on</artifactId>
123-
<version>${bouncyCastleVersion}</version>
124135
</dependency>
125136
<dependency>
126137
<groupId>org.bouncycastle</groupId>
127138
<artifactId>bcprov-jdk18on</artifactId>
128-
<version>${bouncyCastleVersion}</version>
129139
</dependency>
130140
<dependency>
131141
<groupId>io.grpc</groupId>
@@ -230,7 +240,7 @@
230240
<configuration>
231241
<properties>
232242
<configurationParameters>
233-
cucumber.junit-platform.naming-strategy=surefire
243+
cucumber.junit-platform.naming-strategy=long
234244
</configurationParameters>
235245
</properties>
236246
</configuration>

java/src/test/java/scenario/RunScenarioTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
public class RunScenarioTest {
2727
@BeforeAll
2828
public static void startFabric() throws Exception {
29-
System.err.println("Starting Fabric");
29+
System.out.println("Starting Fabric");
3030
ScenarioSteps.startFabric();
3131
}
3232

java/src/test/java/scenario/ScenarioSteps.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -914,7 +914,7 @@ private static String exec(String... commandArgs) throws IOException, Interrupte
914914

915915
private static String exec(Path dir, String... commandArgs) throws IOException, InterruptedException {
916916
String commandString = String.join(" ", commandArgs);
917-
System.err.println(commandString);
917+
System.out.println(commandString);
918918
StringBuilder sb = new StringBuilder();
919919

920920
File dirFile = dir != null ? dir.toFile() : null;

scenario/fixtures/docker-compose/docker-compose-base.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
# See the License for the specific language governing permissions and
1212
# limitations under the License.
1313
#
14-
version: "3.8"
1514

1615
services:
1716
ca0:

scenario/fixtures/docker-compose/docker-compose-cli.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
# limitations under the License.
1313
#
1414

15-
version: "3.8"
16-
1715
services:
1816
clinopeer:
1917
container_name: cli

scenario/fixtures/docker-compose/docker-compose-tls.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
# See the License for the specific language governing permissions and
1212
# limitations under the License.
1313
#
14-
version: "3.8"
1514

1615
services:
1716
ca0.example.com:

0 commit comments

Comments
 (0)