Skip to content

Commit 8ab10ca

Browse files
committed
test-store: Fix rustfmt style in entity_cache tests
1 parent f24825a commit 8ab10ca

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

store/test-store/tests/graph/entity_cache.rs

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -413,9 +413,18 @@ async fn offchain_trigger_vid_collision_without_fix() {
413413
// "duplicate key value violates unique constraint"
414414
// vid = (block << 32) + 100 for BOTH triggers
415415
let expected_vid = ((block as i64) << 32) + 100;
416-
assert_eq!(vid1, expected_vid, "first trigger vid should be (block << 32) + 100");
417-
assert_eq!(vid2, expected_vid, "second trigger vid should ALSO be (block << 32) + 100 — the bug!");
418-
assert_eq!(vid1, vid2, "VIDs collide — this is the bug that causes the DB constraint violation");
416+
assert_eq!(
417+
vid1, expected_vid,
418+
"first trigger vid should be (block << 32) + 100"
419+
);
420+
assert_eq!(
421+
vid2, expected_vid,
422+
"second trigger vid should ALSO be (block << 32) + 100 — the bug!"
423+
);
424+
assert_eq!(
425+
vid1, vid2,
426+
"VIDs collide — this is the bug that causes the DB constraint violation"
427+
);
419428
}
420429

421430
// Test that demonstrates the fix: threading vid_seq from one trigger's
@@ -460,11 +469,17 @@ async fn offchain_trigger_vid_no_collision_with_fix() {
460469
};
461470

462471
// With the fix, VIDs are different
463-
assert_ne!(vid1, vid2, "VIDs should NOT collide when vid_seq is threaded");
472+
assert_ne!(
473+
vid1, vid2,
474+
"VIDs should NOT collide when vid_seq is threaded"
475+
);
464476
let expected_vid1 = ((block as i64) << 32) + 100;
465477
let expected_vid2 = ((block as i64) << 32) + 101;
466478
assert_eq!(vid1, expected_vid1, "first trigger starts at vid_seq 100");
467-
assert_eq!(vid2, expected_vid2, "second trigger continues at vid_seq 101");
479+
assert_eq!(
480+
vid2, expected_vid2,
481+
"second trigger continues at vid_seq 101"
482+
);
468483
}
469484

470485
const ACCOUNT_GQL: &str = "

0 commit comments

Comments
 (0)