Skip to content

Commit fa0bfa4

Browse files
authored
fix(server): close SQLite stores in policy tests (#3466)
Signed-off-by: Kaylee Lubick <klubick@nvidia.com>
1 parent 5bce19a commit fa0bfa4

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

crates/openshell-server/src/grpc/policy.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12101,6 +12101,9 @@ mod tests {
1210112101
.unwrap()
1210212102
.is_some()
1210312103
);
12104+
12105+
// Wait for SQLx's SQLite worker threads to stop before the test process exits;
12106+
state.store.close_for_test().await;
1210412107
}
1210512108

1210612109
#[tokio::test]
@@ -14887,6 +14890,9 @@ mod tests {
1488714890
.status,
1488814891
"approved"
1488914892
);
14893+
14894+
// Wait for SQLx's SQLite worker threads to stop before the test process exits;
14895+
state.store.close_for_test().await;
1489014896
}
1489114897

1489214898
#[tokio::test]
@@ -18770,6 +18776,9 @@ mod tests {
1877018776
"undo must clear stale rejection_reason; got: {:?}",
1877118777
restored.rejection_reason
1877218778
);
18779+
18780+
// Wait for SQLx's SQLite worker threads to stop before the test process exits;
18781+
state.store.close_for_test().await;
1877318782
}
1877418783

1877518784
#[tokio::test]
@@ -18954,6 +18963,9 @@ mod tests {
1895418963
.await
1895518964
.unwrap_err();
1895618965
assert_eq!(undo_err.code(), Code::NotFound);
18966+
18967+
// Wait for SQLx's SQLite worker threads to stop before the test process exits;
18968+
state.store.close_for_test().await;
1895718969
}
1895818970

1895918971
#[test]

0 commit comments

Comments
 (0)