Skip to content

Commit

Permalink
[FLINK-15427][Statebackend][test] Check TTL test in test_stream_state…
Browse files Browse the repository at this point in the history
…_ttl.sh and skip the exception check

Add some specific error message in TtlVerifyUpdateFunction and use it to verify the test

This closes apache#10726.
  • Loading branch information
klion26 authored and tillrohrmann committed Jan 3, 2020
1 parent 29c718d commit 552a076
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ public void flatMap(TtlStateUpdate updates, Collector<String> out) throws Except
for (TtlStateVerifier<?, ?> verifier : TtlStateVerifier.VERIFIERS) {
TtlVerificationContext<?, ?> verificationContext = generateUpdateAndVerificationContext(updates, verifier);
if (!verifier.verify(verificationContext)) {
out.collect(verificationContext.toString());
// Please do **NOT** change the prefix, it's used in test_stream_state_ttl.sh for test verifying
out.collect("TTL verification failed: " + verificationContext.toString());
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions flink-end-to-end-tests/run-nightly-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ run_test "Test PubSub connector with Docker based Google PubSub Emulator" "$END_

run_test "Avro Confluent Schema Registry nightly end-to-end test" "$END_TO_END_DIR/test-scripts/test_confluent_schema_registry.sh"

run_test "State TTL Heap backend end-to-end test" "$END_TO_END_DIR/test-scripts/test_stream_state_ttl.sh file"
run_test "State TTL RocksDb backend end-to-end test" "$END_TO_END_DIR/test-scripts/test_stream_state_ttl.sh rocks"
run_test "State TTL Heap backend end-to-end test" "$END_TO_END_DIR/test-scripts/test_stream_state_ttl.sh file" "skip_check_exceptions"
run_test "State TTL RocksDb backend end-to-end test" "$END_TO_END_DIR/test-scripts/test_stream_state_ttl.sh rocks" "skip_check_exceptions"

run_test "SQL Client end-to-end test (Old planner)" "$END_TO_END_DIR/test-scripts/test_sql_client.sh old"
run_test "SQL Client end-to-end test (Blink planner)" "$END_TO_END_DIR/test-scripts/test_sql_client.sh blink"
Expand Down
6 changes: 5 additions & 1 deletion flink-end-to-end-tests/test-scripts/test_stream_state_ttl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,8 @@ wait_job_running ${JOB}
wait_oper_metric_num_in_records TtlVerifyUpdateFunction.0 ${UPDATE_NUM} "State TTL test job"

# if verification fails job produces failed TTL'ed state updates,
# output would be non-empty and the test will not pass
# output would be non-empty and contains TTL verification failed:
if grep --quiet "TTL verification failed:" $FLINK_DIR/log/*.out ; then
echo "The TTL verification logic failed."
exit 1
fi
4 changes: 2 additions & 2 deletions tools/travis/splits/split_misc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ if [[ ${PROFILE} != *"jdk11"* ]]; then
run_test "Avro Confluent Schema Registry nightly end-to-end test" "$END_TO_END_DIR/test-scripts/test_confluent_schema_registry.sh"
fi

run_test "State TTL Heap backend end-to-end test" "$END_TO_END_DIR/test-scripts/test_stream_state_ttl.sh file"
run_test "State TTL RocksDb backend end-to-end test" "$END_TO_END_DIR/test-scripts/test_stream_state_ttl.sh rocks"
run_test "State TTL Heap backend end-to-end test" "$END_TO_END_DIR/test-scripts/test_stream_state_ttl.sh file" "skip_check_exceptions"
run_test "State TTL RocksDb backend end-to-end test" "$END_TO_END_DIR/test-scripts/test_stream_state_ttl.sh rocks" "skip_check_exceptions"

run_test "SQL Client end-to-end test (Old planner)" "$END_TO_END_DIR/test-scripts/test_sql_client.sh old"
run_test "SQL Client end-to-end test (Blink planner)" "$END_TO_END_DIR/test-scripts/test_sql_client.sh blink"
Expand Down
4 changes: 2 additions & 2 deletions tools/travis/splits/split_misc_hadoopfree.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ run_test "Quickstarts Scala nightly end-to-end test" "$END_TO_END_DIR/test-scrip

run_test "Avro Confluent Schema Registry nightly end-to-end test" "$END_TO_END_DIR/test-scripts/test_confluent_schema_registry.sh"

run_test "State TTL Heap backend end-to-end test" "$END_TO_END_DIR/test-scripts/test_stream_state_ttl.sh file"
run_test "State TTL RocksDb backend end-to-end test" "$END_TO_END_DIR/test-scripts/test_stream_state_ttl.sh rocks"
run_test "State TTL Heap backend end-to-end test" "$END_TO_END_DIR/test-scripts/test_stream_state_ttl.sh file" "skip_check_exceptions"
run_test "State TTL RocksDb backend end-to-end test" "$END_TO_END_DIR/test-scripts/test_stream_state_ttl.sh rocks" "skip_check_exceptions"

run_test "Dependency shading of table modules test" "$END_TO_END_DIR/test-scripts/test_table_shaded_dependencies.sh"

Expand Down

0 comments on commit 552a076

Please sign in to comment.