mirror of
https://github.com/rustfs/rustfs.git
synced 2026-10-04 04:21:35 +00:00
test(scanner): stabilize W13 release evidence gates (#7870)
Add the object-only completion diagnostic case and make the evidence runner resolve CARGO_TARGET_DIR before recording the rustfs binary path. Co-authored-by: zhi22915 <qiuzgang@gmail.com>
This commit is contained in:
@@ -349,7 +349,11 @@ trap cleanup_tmp EXIT
|
||||
|
||||
BUILD_FEATURES="${RUSTFS_BUILD_FEATURES:-}"
|
||||
TARGET_DIR="${CARGO_TARGET_DIR:-$ROOT/target}"
|
||||
if [[ "$TARGET_DIR" != /* ]]; then
|
||||
TARGET_DIR="$ROOT/$TARGET_DIR"
|
||||
fi
|
||||
DEBUG_DIR="$TARGET_DIR/debug"
|
||||
SERVER_BINARY="$DEBUG_DIR/rustfs"
|
||||
if [[ "${RUSTFS_SCANNER_HEAL_SKIP_CLEAN:-0}" != "1" ]]; then
|
||||
cargo clean -p rustfs
|
||||
fi
|
||||
@@ -365,7 +369,7 @@ cargo nextest list --profile "$PROFILE" -p e2e_test -E "$TEST_FILTER" --message-
|
||||
TEST_BINARY="$(test_binary_from_listing "$LISTING_TMP" "$CASE_ID")"
|
||||
|
||||
export RUSTFS_E2E_EXPECTED_FEATURES="${RUSTFS_E2E_EXPECTED_FEATURES:-default}"
|
||||
"$PYTHON_BIN" "$ROOT/scripts/check_test_wiring.py" --begin-scanner-heal "$RUN_DIR" "$DEBUG_DIR/rustfs" "$TEST_BINARY"
|
||||
"$PYTHON_BIN" "$ROOT/scripts/check_test_wiring.py" --begin-scanner-heal "$RUN_DIR" "$SERVER_BINARY" "$TEST_BINARY"
|
||||
cp "$LISTING_TMP" "$RUN_DIR/listing.json"
|
||||
export RUSTFS_E2E_LOG_DIR="${RUSTFS_E2E_LOG_DIR:-$RUN_DIR/e2e-logs}"
|
||||
export RUSTFS_HEAL_CHAOS_LOG_DIR="${RUSTFS_HEAL_CHAOS_LOG_DIR:-$RUSTFS_E2E_LOG_DIR}"
|
||||
|
||||
@@ -150,6 +150,33 @@ class ReportTests(unittest.TestCase):
|
||||
raw_page_index_indexed_entries=2)
|
||||
self.assertFalse(replays_raw_window(previous, indexed))
|
||||
|
||||
def test_object_only_completion_round_is_not_a_raw_window_replay(self):
|
||||
previous = self.report()
|
||||
previous.update(round=0, pid=123, raw_entries=0, raw_name_bytes=0,
|
||||
raw_first_entry=None, raw_last_entry=None,
|
||||
raw_page_index_parent="bucket",
|
||||
raw_page_index_complete=True,
|
||||
raw_page_index_committed_entries=4,
|
||||
raw_page_index_indexed_entries=4,
|
||||
objects_before=2, objects_processed=2,
|
||||
objects_retained=4, versions_retained=4,
|
||||
bytes_retained=4, snapshot_complete=False,
|
||||
outcome="partial")
|
||||
current = self.report()
|
||||
current.update(round=1, pid=124, raw_entries=0, raw_name_bytes=0,
|
||||
raw_first_entry=None, raw_last_entry=None,
|
||||
raw_page_index_parent=None,
|
||||
raw_page_index_complete=False,
|
||||
raw_page_index_committed_entries=0,
|
||||
raw_page_index_indexed_entries=0,
|
||||
objects_before=4, objects_processed=1,
|
||||
objects_retained=4, versions_retained=4,
|
||||
bytes_retained=4, snapshot_complete=True,
|
||||
outcome="complete")
|
||||
|
||||
self.assertFalse(replays_raw_window(previous, current))
|
||||
validate_recoverable_quantum([previous, current], objects=4, budget=16, require_converged=True)
|
||||
|
||||
def test_recoverable_quantum_rejects_replayed_raw_window(self):
|
||||
previous = self.report()
|
||||
previous.update(objects_retained=0, versions_retained=0, bytes_retained=0,
|
||||
|
||||
Reference in New Issue
Block a user