mirror of
https://tangled.org/tranquil.farm/tranquil-pds
synced 2026-09-26 20:24:15 +00:00
test: introduce test jail to hide lewis' sins
We've got a bunch of tests that never pass because they time out on their own, or that take 10s because they test a 10s timeout, that we can rethink. Together they introduce a lot of slowness. This puts anything over 10s in CI into test jail.
This commit is contained in:
@@ -395,7 +395,7 @@ async fn test_fetch_schema_error_status_gives_meaningful_error() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn test_plc_server_timeout() {
|
||||
async fn jail_test_plc_server_timeout() {
|
||||
let plc_server = MockServer::start().await;
|
||||
let did = "did:plc:timeout123";
|
||||
|
||||
|
||||
@@ -687,7 +687,7 @@ fn create_account_on_node<'a>(
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn cross_node_rate_limit_via_login() {
|
||||
async fn jail_cross_node_rate_limit_via_login() {
|
||||
let nodes = crate::common::cluster().await;
|
||||
let client = crate::common::client();
|
||||
|
||||
|
||||
@@ -1168,7 +1168,7 @@ async fn test_backup_restore_workflow() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn test_scale_1000_posts_with_pagination() {
|
||||
async fn jail_test_scale_1000_posts_with_pagination() {
|
||||
let client = client();
|
||||
let base = base_url().await;
|
||||
let (did, jwt) = setup_new_user("scale-posts").await;
|
||||
@@ -1279,7 +1279,7 @@ async fn test_scale_1000_posts_with_pagination() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn test_scale_many_users_social_graph() {
|
||||
async fn jail_test_scale_many_users_social_graph() {
|
||||
let client = client();
|
||||
let base = base_url().await;
|
||||
|
||||
@@ -1690,7 +1690,7 @@ async fn test_scale_batch_operations() {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn test_scale_reply_thread_depth() {
|
||||
async fn jail_test_scale_reply_thread_depth() {
|
||||
let client = client();
|
||||
let base = base_url().await;
|
||||
let (did, jwt) = setup_new_user("deep-thread").await;
|
||||
|
||||
@@ -1327,7 +1327,7 @@ mod tests {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn timed_out_write_resets_stream_instead_of_truncating() {
|
||||
async fn jail_timed_out_write_resets_stream_instead_of_truncating() {
|
||||
let shutdown = CancellationToken::new();
|
||||
let (sender, _rx_sender) =
|
||||
Transport::bind("127.0.0.1:0".parse().unwrap(), None, shutdown.clone())
|
||||
@@ -1368,7 +1368,7 @@ mod tests {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn write_timeout_keeps_connection() {
|
||||
async fn jail_write_timeout_keeps_connection() {
|
||||
use futures::StreamExt;
|
||||
|
||||
let shutdown = CancellationToken::new();
|
||||
|
||||
@@ -99,7 +99,7 @@ test-unit:
|
||||
SQLX_OFFLINE=true cargo test --test it -- dpop_unit:: validation_edge_cases:: scope_edge_cases::
|
||||
|
||||
store_run := "SQLX_OFFLINE=true TRANQUIL_TEST_BACKEND=store TRANQUIL_PDS_ALLOW_INSECURE_SECRETS=1 DISABLE_RATE_LIMITING=1 TRANQUIL_LEXICON_OFFLINE=1 SKIP_IMPORT_VERIFICATION=true cargo nextest run --workspace --exclude tranquil-store --features tranquil-store/skip-fsync,tranquil-api/low-bcrypt-cost"
|
||||
store_test := store_run + " -E 'not (binary(it) and test(/^store_parity::/)) and not (package(tranquil-signal) and test(/^tests::/))'"
|
||||
store_test := store_run + " -E 'not (binary(it) and test(/^store_parity::/)) and not (package(tranquil-signal) and test(/^tests::/)) and not test(~jail_)'"
|
||||
|
||||
test-auth:
|
||||
{{store_run}} --test it -E 'test(/^(oauth|oauth_lifecycle|oauth_scopes|oauth_security|jwt_security|session_management|change_password|password_reset)::/)'
|
||||
@@ -131,6 +131,10 @@ test-misc:
|
||||
test *args:
|
||||
{{store_test}} {{args}}
|
||||
|
||||
# these tests stay in jail until lewis makes them behave
|
||||
test-jail *args:
|
||||
{{store_run}} -E 'test(~jail_)' {{args}}
|
||||
|
||||
test-one name:
|
||||
{{store_run}} --test it -E 'test(/^{{name}}::/)'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user