Skip to content

Commit ec61c65

Browse files
jaymellsvix-james
authored andcommitted
Attempt fix flake
This test is flaky around the fifth run for some reason. My guess is because another cleanup process is interfering, which seems strange but not impossible. Anyway, moving the content-existence check to _before_ changing its expiration seems to fix the issue.
1 parent d5d90f1 commit ec61c65

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

server/svix-server/tests/it/e2e_message.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,12 @@ async fn test_payload_retention_period() {
395395
.unwrap();
396396
let msg_id = msg.id.clone();
397397

398+
let content: Option<messagecontent::Model> = messagecontent::Entity::find_by_id(msg_id.clone())
399+
.one(&pool)
400+
.await
401+
.unwrap();
402+
assert_eq!(content.unwrap().id, msg_id.clone());
403+
398404
let res = messagecontent::Entity::update_many()
399405
.col_expr(
400406
messagecontent::Column::Expiration,
@@ -406,12 +412,6 @@ async fn test_payload_retention_period() {
406412
.unwrap();
407413
assert_eq!(1, res.rows_affected);
408414

409-
let content: Option<messagecontent::Model> = messagecontent::Entity::find_by_id(msg_id.clone())
410-
.one(&pool)
411-
.await
412-
.unwrap();
413-
assert_eq!(content.unwrap().id, msg_id.clone());
414-
415415
expired_message_cleaner::clean_expired_messages(&pool, 5000, false)
416416
.await
417417
.unwrap();

0 commit comments

Comments
 (0)