drop x at the end of most tests

This commit is contained in:
Bryan Stitt 2023-07-21 16:18:33 -07:00
parent 620f2d9d00
commit 0ef8bb50e8
5 changed files with 18 additions and 1 deletions

@ -264,6 +264,10 @@ async fn test_multiple_proxies_stats_add_up() {
// "user_get_influx_stats_detailed stats are: {:?}", // "user_get_influx_stats_detailed stats are: {:?}",
// user_get_influx_stats_detailed // user_get_influx_stats_detailed
// ); // );
// drop x first to avoid spurious warnings about anvil/influx/mysql shutting down before the app
drop(x_0);
drop(x_1);
} }
// Gotta compare stats with influx: // Gotta compare stats with influx:

@ -20,6 +20,9 @@ async fn it_migrates_the_db() {
// we call flush stats more to be sure it works than because we expect it to save any stats // we call flush stats more to be sure it works than because we expect it to save any stats
x.flush_stats().await.unwrap(); x.flush_stats().await.unwrap();
// drop x first to avoid spurious warnings about anvil/influx/mysql shutting down before the app
drop(x);
} }
#[test_log::test(tokio::test)] #[test_log::test(tokio::test)]

@ -232,7 +232,8 @@ async fn test_single_proxy_stats_add_up() {
// user_get_influx_stats_detailed // user_get_influx_stats_detailed
// ); // );
// drop x before the other things so that we don't get spurious errors
// drop x first to avoid spurious warnings about anvil/influx/mysql shutting down before the app
drop(x); drop(x);
} }

@ -215,4 +215,7 @@ async fn test_sum_credits_used() {
assert_eq!(admin_balance.remaining(), 0.into(), "remaining"); assert_eq!(admin_balance.remaining(), 0.into(), "remaining");
// TODO: query "user 0" to get the public counts // TODO: query "user 0" to get the public counts
// drop x first to avoid spurious warnings about anvil/influx/mysql shutting down before the app
drop(x);
} }

@ -562,6 +562,9 @@ async fn test_referral_bonus_concurrent_referrer_only() {
referrer_balance_pre + difference / Decimal::from(10), referrer_balance_pre + difference / Decimal::from(10),
referrer_balance_post referrer_balance_post
); );
// drop x first to avoid spurious warnings about anvil/influx/mysql shutting down before the app
drop(x);
} }
#[cfg_attr(not(feature = "tests-needing-docker"), ignore)] #[cfg_attr(not(feature = "tests-needing-docker"), ignore)]
@ -747,4 +750,7 @@ async fn test_referral_bonus_concurrent_referrer_and_user() {
(referrer_balance_pre - user_difference + user_difference / Decimal::from(10)), (referrer_balance_pre - user_difference + user_difference / Decimal::from(10)),
referrer_balance_post referrer_balance_post
); );
// drop x first to avoid spurious warnings about anvil/influx/mysql shutting down before the app
drop(x);
} }