Skip to content

Commit 8d5e92d

Browse files
VGalaxiesJackieTien97
authored andcommitted
Subscription IT: add IoTDBSubscriptionTopicIT for table model (#15525)
(cherry picked from commit cb19f37)
1 parent 7f574ba commit 8d5e92d

File tree

3 files changed

+494
-21
lines changed

3 files changed

+494
-21
lines changed

.github/workflows/pipe-it.yml

Lines changed: 87 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,91 @@ jobs:
512512
if: failure()
513513
uses: actions/upload-artifact@v4
514514
with:
515-
name: cluster-log-subscription-java${{ matrix.java }}-${{ runner.os }}-${{ matrix.cluster1 }}-${{ matrix.cluster2 }}
515+
name: cluster-log-subscription-tree-arch-verification-java${{ matrix.java }}-${{ runner.os }}-${{ matrix.cluster1 }}-${{ matrix.cluster2 }}
516+
path: integration-test/target/cluster-logs
517+
retention-days: 30
518+
subscription-table-arch-verification:
519+
strategy:
520+
fail-fast: false
521+
max-parallel: 15
522+
matrix:
523+
java: [ 17 ]
524+
# StrongConsistencyClusterMode is ignored now because RatisConsensus has not been supported yet.
525+
cluster1: [ ScalableSingleNodeMode ]
526+
cluster2: [ ScalableSingleNodeMode ]
527+
os: [ ubuntu-latest ]
528+
runs-on: ${{ matrix.os }}
529+
steps:
530+
- uses: actions/checkout@v4
531+
- name: Set up JDK ${{ matrix.java }}
532+
uses: actions/setup-java@v4
533+
with:
534+
distribution: liberica
535+
java-version: ${{ matrix.java }}
536+
- name: Cache Maven packages
537+
uses: actions/cache@v4
538+
with:
539+
path: ~/.m2
540+
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
541+
restore-keys: ${{ runner.os }}-m2-
542+
- name: Sleep for a random duration between 0 and 10000 milliseconds
543+
run: |
544+
sleep $(( $(( RANDOM % 10000 + 1 )) / 1000))
545+
- name: IT Test
546+
shell: bash
547+
# we do not compile client-cpp for saving time, it is tested in client.yml
548+
# we can skip influxdb-protocol because it has been tested separately in influxdb-protocol.yml
549+
run: |
550+
retry() {
551+
local -i max_attempts=3
552+
local -i attempt=1
553+
local -i retry_sleep=5
554+
local test_output
555+
556+
while [ $attempt -le $max_attempts ]; do
557+
mvn clean verify \
558+
-P with-integration-tests \
559+
-DskipUTs \
560+
-DintegrationTest.forkCount=1 -DConfigNodeMaxHeapSize=256 -DDataNodeMaxHeapSize=1024 -DDataNodeMaxDirectMemorySize=768 \
561+
-DClusterConfigurations=${{ matrix.cluster1 }},${{ matrix.cluster2 }} \
562+
-pl integration-test \
563+
-am -PMultiClusterIT2SubscriptionTableArchVerification \
564+
-ntp >> ~/run-tests-$attempt.log && return 0
565+
test_output=$(cat ~/run-tests-$attempt.log)
566+
567+
echo "==================== BEGIN: ~/run-tests-$attempt.log ===================="
568+
echo "$test_output"
569+
echo "==================== END: ~/run-tests-$attempt.log ======================"
570+
571+
if ! mv ~/run-tests-$attempt.log integration-test/target/cluster-logs/ 2>/dev/null; then
572+
echo "Failed to move log file ~/run-tests-$attempt.log to integration-test/target/cluster-logs/. Skipping..."
573+
fi
574+
575+
if echo "$test_output" | grep -q "Could not transfer artifact"; then
576+
if [ $attempt -lt $max_attempts ]; then
577+
echo "Test failed with artifact transfer issue, attempt $attempt. Retrying in $retry_sleep seconds..."
578+
sleep $retry_sleep
579+
attempt=$((attempt + 1))
580+
else
581+
echo "Test failed after $max_attempts attempts due to artifact transfer issue."
582+
echo "Treating this as a success because the issue is likely transient."
583+
return 0
584+
fi
585+
elif [ $? -ne 0 ]; then
586+
echo "Test failed with a different error."
587+
return 1
588+
else
589+
echo "Tests passed"
590+
return 0
591+
fi
592+
done
593+
}
594+
retry
595+
- name: Upload Artifact
596+
if: failure()
597+
uses: actions/upload-artifact@v4
598+
with:
599+
name: cluster-log-subscription-table-arch-verification-java${{ matrix.java }}-${{ runner.os }}-${{ matrix.cluster1 }}-${{ matrix.cluster2 }}
516600
path: integration-test/target/cluster-logs
517601
retention-days: 30
518602
subscription-tree-regression-consumer:
@@ -596,7 +680,7 @@ jobs:
596680
if: failure()
597681
uses: actions/upload-artifact@v4
598682
with:
599-
name: cluster-log-subscription-regression-consumer-java${{ matrix.java }}-${{ runner.os }}-${{ matrix.cluster1 }}-${{ matrix.cluster2 }}
683+
name: cluster-log-subscription-tree-regression-consumer-java${{ matrix.java }}-${{ runner.os }}-${{ matrix.cluster1 }}-${{ matrix.cluster2 }}
600684
path: integration-test/target/cluster-logs
601685
retention-days: 30
602686
subscription-tree-regression-misc:
@@ -680,7 +764,7 @@ jobs:
680764
if: failure()
681765
uses: actions/upload-artifact@v4
682766
with:
683-
name: cluster-log-subscription-regression-misc-java${{ matrix.java }}-${{ runner.os }}-${{ matrix.cluster1 }}-${{ matrix.cluster2 }}
767+
name: cluster-log-subscription-tree-regression-misc-java${{ matrix.java }}-${{ runner.os }}-${{ matrix.cluster1 }}-${{ matrix.cluster2 }}
684768
path: integration-test/target/cluster-logs
685769
retention-days: 30
686770
dual-table-manual-basic:

integration-test/src/test/java/org/apache/iotdb/subscription/it/dual/tablemodel/.gitkeep

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)