Skip to content

Commit 4c26efc

Browse files
committed
move jrf test to the develop branch
1 parent 799c65b commit 4c26efc

File tree

13 files changed

+1604
-57
lines changed

13 files changed

+1604
-57
lines changed

integration-tests/pom.xml

Lines changed: 255 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,128 @@
2525
<url>https://github.com/oracle/weblogic-kubernetes-operator/blob/master/LICENSE</url>
2626
</license>
2727
</licenses>
28+
29+
<properties>
30+
<src-integration-test>${project.basedir}/src/test/java</src-integration-test>
31+
<resource-integration-test>${project.basedir}/src/test/resources</resource-integration-test>
32+
</properties>
33+
<build>
34+
<plugins>
35+
<plugin>
36+
<groupId>org.apache.maven.plugins</groupId>
37+
<artifactId>maven-surefire-plugin</artifactId>
38+
<version>2.20.1</version>
39+
<configuration>
40+
<skipTests>true</skipTests>
41+
</configuration>
42+
</plugin>
43+
<plugin>
44+
<groupId>org.codehaus.mojo</groupId>
45+
<artifactId>exec-maven-plugin</artifactId>
46+
<version>1.6.0</version>
47+
<executions>
48+
<execution>
49+
<goals>
50+
<goal>java</goal>
51+
</goals>
52+
<configuration>
53+
<skip>${skipITs}</skip>
54+
</configuration>
55+
</execution>
56+
<execution><!-- pull or build images, create secrets, etc -->
57+
<id>${setupenvid}</id>
58+
<phase>pre-integration-test</phase>
59+
<goals>
60+
<goal>exec</goal>
61+
</goals>
62+
<configuration>
63+
<skip>${skipITs}</skip>
64+
<executable>${resource-integration-test}/${setupenvid}.sh</executable>
65+
</configuration>
66+
</execution>
67+
</executions>
68+
</plugin>
69+
<plugin>
70+
<groupId>org.codehaus.mojo</groupId>
71+
<artifactId>build-helper-maven-plugin</artifactId>
72+
<version>3.0.0</version>
73+
<executions>
74+
<execution>
75+
<id>add-test-source</id>
76+
<phase>generate-test-resources</phase>
77+
<goals>
78+
<goal>add-test-source</goal>
79+
</goals>
80+
<configuration>
81+
<sources>
82+
<source>${src-integration-test}</source>
83+
</sources>
84+
</configuration>
85+
</execution>
86+
<execution>
87+
<id>add-test-resource</id>
88+
<phase>generate-test-resources</phase>
89+
<goals>
90+
<goal>add-test-resource</goal>
91+
</goals>
92+
<configuration>
93+
<resources>
94+
<resource>
95+
<directory>${resource-integration-test}</directory>
96+
</resource>
97+
</resources>
98+
</configuration>
99+
</execution>
100+
</executions>
101+
</plugin>
102+
103+
<plugin>
104+
<groupId>org.apache.maven.plugins</groupId>
105+
<artifactId>maven-failsafe-plugin</artifactId>
106+
<version>2.22.1</version>
107+
<configuration> <!-- run tests in parallel -->
108+
<encoding>UTF-8</encoding>
109+
<argLine>${failsafeArgLine}</argLine>
110+
<failIfNoTests>false</failIfNoTests>
111+
<systemPropertyVariables>
112+
<!-- Add any system properties here -->
113+
<!--<project.build.directory>${project.build.directory}</project.build.directory> -->
114+
<!--<weblogic.operator.root.directory>${basedir}/..</weblogic.operator.root.directory> -->
115+
<!--<TAGS>${env.TAGS}</TAGS> -->
116+
<maxThreads>3</maxThreads>
117+
</systemPropertyVariables>
118+
<additionalClasspathElements>
119+
<additionalClasspathElement>${project.basedir}/src/test/resources/wlthint3client.jar</additionalClasspathElement>
120+
</additionalClasspathElements>
121+
<includes>
122+
<include>
123+
${includes-failsafe}
124+
</include>
125+
</includes>
126+
</configuration>
127+
128+
<executions>
129+
<execution>
130+
<id>integration-tests</id>
131+
<goals>
132+
<goal>integration-test</goal>
133+
<goal>verify</goal>
134+
</goals>
135+
<phase>integration-test</phase>
136+
<configuration>
137+
<skipTests>${skipITs}</skipTests>
138+
<systemPropertyVariables>
139+
<!-- Set JUL Formatting -->
140+
<java.util.logging.SimpleFormatter.format>%1$tm-%1$td-%1$tY %1$tH:%1$tM:%1$tS %4$-6s %2$s %5$s%6$s%n</java.util.logging.SimpleFormatter.format>
141+
</systemPropertyVariables>
142+
<trimStackTrace>false</trimStackTrace>
143+
</configuration>
144+
</execution>
145+
</executions>
146+
</plugin>
147+
</plugins>
148+
</build>
149+
28150
<dependencies>
29151
<!-- test dependencies -->
30152
<dependency>
@@ -61,16 +183,16 @@
61183
<artifactId>guava</artifactId>
62184
<version>${guava-version}</version>
63185
</dependency>
64-
<dependency>
65-
<groupId>org.yaml</groupId>
66-
<artifactId>snakeyaml</artifactId>
67-
<version>${snakeyaml-version}</version>
68-
</dependency>
69-
<dependency>
70-
<groupId>io.kubernetes</groupId>
71-
<artifactId>client-java</artifactId>
72-
<scope>test</scope>
73-
</dependency>
186+
<dependency>
187+
<groupId>org.yaml</groupId>
188+
<artifactId>snakeyaml</artifactId>
189+
<version>${snakeyaml-version}</version>
190+
</dependency>
191+
<dependency>
192+
<groupId>io.kubernetes</groupId>
193+
<artifactId>client-java</artifactId>
194+
<scope>test</scope>
195+
</dependency>
74196
<dependency>
75197
<groupId>javax.jms</groupId>
76198
<artifactId>javax.jms-api</artifactId>
@@ -88,12 +210,14 @@
88210

89211
<profile>
90212
<id>java-integration-tests</id>
213+
91214
<properties>
92-
<src-integration-test>${project.basedir}/src/test/java</src-integration-test>
93-
<resource-integration-test>${project.basedir}/src/test/resources</resource-integration-test>
94215
<skipITs>false</skipITs>
216+
<setupenvid>setupenv</setupenvid>
217+
<includes-failsafe>**/IT*</includes-failsafe>
95218
</properties>
96-
<build>
219+
220+
<!-- <build>
97221
<plugins>
98222
<plugin>
99223
<groupId>org.codehaus.mojo</groupId>
@@ -105,7 +229,7 @@
105229
<goal>java</goal>
106230
</goals>
107231
</execution>
108-
<execution><!-- pull or build images, create secrets, etc -->
232+
<execution>
109233
<id>setupenv</id>
110234
<phase>pre-integration-test</phase>
111235
<goals>
@@ -155,15 +279,12 @@
155279
<groupId>org.apache.maven.plugins</groupId>
156280
<artifactId>maven-failsafe-plugin</artifactId>
157281
<version>2.22.1</version>
158-
<configuration> <!-- run tests in parallel -->
282+
<configuration>
159283
<encoding>UTF-8</encoding>
160284
<argLine>${failsafeArgLine}</argLine>
161285
<failIfNoTests>false</failIfNoTests>
162286
<systemPropertyVariables>
163-
<!-- Add any system properties here -->
164-
<!--<project.build.directory>${project.build.directory}</project.build.directory> -->
165-
<!--<weblogic.operator.root.directory>${basedir}/..</weblogic.operator.root.directory> -->
166-
<!--<TAGS>${env.TAGS}</TAGS> -->
287+
167288
<maxThreads>3</maxThreads>
168289
</systemPropertyVariables>
169290
<additionalClasspathElements>
@@ -182,7 +303,7 @@
182303
<configuration>
183304
<skipTests>${skipITs}</skipTests>
184305
<systemPropertyVariables>
185-
<!-- Set JUL Formatting -->
306+
186307
<java.util.logging.SimpleFormatter.format>%1$tm-%1$td-%1$tY %1$tH:%1$tM:%1$tS %4$-6s %2$s %5$s%6$s%n</java.util.logging.SimpleFormatter.format>
187308
</systemPropertyVariables>
188309
<trimStackTrace>false</trimStackTrace>
@@ -192,6 +313,118 @@
192313
</plugin>
193314
</plugins>
194315
</build>
316+
-->
317+
</profile>
318+
<profile>
319+
<id>jrf-integration-tests</id>
320+
<properties>
321+
<src-integration-test>${project.basedir}/src/test/java</src-integration-test>
322+
<resource-integration-test>${project.basedir}/src/test/resources</resource-integration-test>
323+
<skipITs>false</skipITs>
324+
<setupenvid>setupjrfenv</setupenvid>
325+
<includes-failsafe>**/JrfInOperatorTest.java</includes-failsafe>
326+
</properties>
327+
<!-- <build>
328+
<plugins>
329+
<plugin>
330+
<groupId>org.codehaus.mojo</groupId>
331+
<artifactId>exec-maven-plugin</artifactId>
332+
<version>1.6.0</version>
333+
<executions>
334+
<execution>
335+
<goals>
336+
<goal>java</goal>
337+
</goals>
338+
</execution>
339+
<execution>
340+
<id>setupjrfenv</id>
341+
<phase>pre-integration-test</phase>
342+
<goals>
343+
<goal>exec</goal>
344+
</goals>
345+
<configuration>
346+
<executable>${resource-integration-test}/setupjrfenv.sh</executable>
347+
</configuration>
348+
</execution>
349+
</executions>
350+
</plugin>
351+
<plugin>
352+
<groupId>org.codehaus.mojo</groupId>
353+
<artifactId>build-helper-maven-plugin</artifactId>
354+
<version>3.0.0</version>
355+
<executions>
356+
<execution>
357+
<id>add-test-source</id>
358+
<phase>generate-test-resources</phase>
359+
<goals>
360+
<goal>add-test-source</goal>
361+
</goals>
362+
<configuration>
363+
<sources>
364+
<source>${src-integration-test}</source>
365+
</sources>
366+
</configuration>
367+
</execution>
368+
<execution>
369+
<id>add-test-resource</id>
370+
<phase>generate-test-resources</phase>
371+
<goals>
372+
<goal>add-test-resource</goal>
373+
</goals>
374+
<configuration>
375+
<resources>
376+
<resource>
377+
<directory>${resource-integration-test}</directory>
378+
</resource>
379+
</resources>
380+
</configuration>
381+
</execution>
382+
</executions>
383+
</plugin>
384+
<plugin>
385+
<groupId>org.apache.maven.plugins</groupId>
386+
<artifactId>maven-failsafe-plugin</artifactId>
387+
<version>2.22.1</version>
388+
<configuration>
389+
<encoding>UTF-8</encoding>
390+
<argLine>${failsafeArgLine}</argLine>
391+
<failIfNoTests>false</failIfNoTests>
392+
<systemPropertyVariables>
393+
394+
<maxThreads>3</maxThreads>
395+
</systemPropertyVariables>
396+
<additionalClasspathElements>
397+
<additionalClasspathElement>${project.basedir}/src/test/resources/wlthint3client.jar</additionalClasspathElement>
398+
</additionalClasspathElements>
399+
<includes>
400+
<include>
401+
**/JrfInOperatorTest.java
402+
</include>
403+
</includes>
404+
</configuration>
405+
406+
<executions>
407+
<execution>
408+
<id>integration-tests</id>
409+
<goals>
410+
<goal>integration-test</goal>
411+
<goal>verify</goal>
412+
</goals>
413+
<phase>integration-test</phase>
414+
<configuration>
415+
<skipTests>${skipITs}</skipTests>
416+
<systemPropertyVariables>
417+
418+
<java.util.logging.SimpleFormatter.format>%1$tm-%1$td-%1$tY %1$tH:%1$tM:%1$tS %4$-6s %2$s %5$s%6$s%n</java.util.logging.SimpleFormatter.format>
419+
</systemPropertyVariables>
420+
<trimStackTrace>false</trimStackTrace>
421+
</configuration>
422+
</execution>
423+
</executions>
424+
</plugin>
425+
</plugins>
426+
</build>
427+
-->
195428
</profile>
196429

197430
<profile>
@@ -202,6 +435,8 @@
202435
<properties>
203436
<surefireArgLine></surefireArgLine>
204437
<failsafeArgLine></failsafeArgLine>
438+
<skipITs>true</skipITs>
439+
205440
</properties>
206441
<build>
207442
<plugins>

integration-tests/src/test/java/oracle/kubernetes/operator/BaseTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ public static void initialize(String appPropsFile) throws Exception {
9898
username = appProps.getProperty("username", username);
9999
password = appProps.getProperty("password", password);
100100
maxIterationsPod =
101-
new Integer(appProps.getProperty("maxIterationsPod", "" + maxIterationsPod)).intValue();
102-
waitTimePod = new Integer(appProps.getProperty("waitTimePod", "" + waitTimePod)).intValue();
101+
Integer.parseInt(appProps.getProperty("maxIterationsPod", "" + maxIterationsPod));
102+
waitTimePod = Integer.parseInt(appProps.getProperty("waitTimePod", "" + waitTimePod));
103103
if (System.getenv("RESULT_ROOT") != null) {
104104
resultRoot = System.getenv("RESULT_ROOT");
105105
} else {

0 commit comments

Comments
 (0)