Skip to content

Commit 2a7bd6b

Browse files
committed
use IT_CLASS var in archive file name
1 parent 61db35e commit 2a7bd6b

File tree

9 files changed

+14
-11
lines changed

9 files changed

+14
-11
lines changed

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ private void callWebAppAndVerifyScaling(Domain domain, int replicas) throws Exce
597597
}
598598
}
599599

600-
public static void tearDown() throws Exception {
600+
public static void tearDown(String iTClassName) throws Exception {
601601
logger.log(
602602
Level.INFO,
603603
"TEARDOWN: Starting Test Run TearDown (cleanup and state-dump)."
@@ -606,8 +606,11 @@ public static void tearDown() throws Exception {
606606
+ "after the tearDown completes. Note that tearDown itself may report errors,"
607607
+ " but this won't affect the outcome of the test results.");
608608
StringBuffer cmd =
609-
new StringBuffer("export RESULT_ROOT=$RESULT_ROOT && export PV_ROOT=$PV_ROOT && ");
610-
cmd.append(BaseTest.getProjectRoot())
609+
new StringBuffer(
610+
"export RESULT_ROOT=$RESULT_ROOT && export PV_ROOT=$PV_ROOT && export IT_CLASS=");
611+
cmd.append(iTClassName)
612+
.append(" && ")
613+
.append(BaseTest.getProjectRoot())
611614
.append("/integration-tests/src/test/resources/statedump.sh");
612615
logger.info("Running " + cmd);
613616

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public static void staticUnPrepare() throws Exception {
5454
logger.info("BEGIN");
5555
logger.info("Run once, release cluster lease");
5656

57-
tearDown();
57+
tearDown(new Object() {}.getClass().getEnclosingClass().getSimpleName());
5858

5959
logger.info("SUCCESS");
6060
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public static void staticUnPrepare() throws Exception {
6464
logger.info("Run once, release cluster lease");
6565

6666
destroyPodsRestartdomain();
67-
tearDown();
67+
tearDown(new Object() {}.getClass().getEnclosingClass().getSimpleName());
6868

6969
logger.info("SUCCESS");
7070
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ public static void staticUnPrepare() throws Exception {
130130
logger.info("BEGIN");
131131
logger.info("Run once, release cluster lease");
132132

133-
tearDown();
133+
tearDown(new Object() {}.getClass().getEnclosingClass().getSimpleName());
134134

135135
logger.info("SUCCESS");
136136
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public static void staticUnPrepare() throws Exception {
9797
logger.info("BEGIN");
9898
logger.info("Run once, release cluster lease");
9999

100-
tearDown();
100+
tearDown(new Object() {}.getClass().getEnclosingClass().getSimpleName());
101101

102102
logger.info("SUCCESS");
103103
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public static void staticUnPrepare() throws Exception {
107107
if (!QUICKTEST) {
108108
ExecResult result = TestUtils.exec("kubectl delete -f " + mysqlYamlFile);
109109
destroySitConfigDomain();
110-
tearDown();
110+
tearDown(new Object() {}.getClass().getEnclosingClass().getSimpleName());
111111
}
112112
}
113113

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public static void staticUnPrepare() throws Exception {
5959
logger.info("BEGIN");
6060
logger.info("Run once, release cluster lease");
6161

62-
tearDown();
62+
tearDown(new Object() {}.getClass().getEnclosingClass().getSimpleName());
6363

6464
logger.info("SUCCESS");
6565
}

integration-tests/src/test/resources/statedump.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ function state_dump {
1717
local SCRIPTPATH="$PROJECT_ROOT/src/integration-tests/bash"
1818
local LEASE_ID="$LEASE_ID"
1919
local ARCHIVE_DIR="$RESULT_ROOT/acceptance_test_pv_archive"
20-
local ARCHIVE_FILE="IntSuite.`date '+%Y%m%d%H%M%S'`.jar"
20+
local ARCHIVE_FILE="IntSuite.${IT_CLASS}.PV.`date '+%Y%m%d%H%M%S'`.jar"
2121
local ARCHIVE="$ARCHIVE_DIR/$ARCHIVE_FILE"
2222

2323
if [ ! -d "$RESULT_DIR" ]; then

src/integration-tests/bash/archive.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function fail {
2424
function archive {
2525
local SOURCE_DIR="${1?}"
2626
local ARCHIVE_DIR="${2?}"
27-
local ARCHIVE_FILE="IntSuite.`date '+%Y%m%d%H%M%S'`.jar"
27+
local ARCHIVE_FILE="IntSuite.${IT_CLASS}.TMP.`date '+%Y%m%d%H%M%S'`.jar"
2828
local ARCHIVE="$ARCHIVE_DIR/$ARCHIVE_FILE"
2929
local OUTFILE="/tmp/$ARCHIVE_FILE"
3030

0 commit comments

Comments
 (0)