Background
During the dispatch-core → OkHttp3 migration (#9, PR #28), a family of *ServerSetupAsync test-setup traits and async-style test suites survived in the test tree.
Clarification: the "Async" here is ScalaTest's AsyncFeatureSpec test-writing style (test bodies return Future[Assertion]), not the dispatch/AsyncHttpClient HTTP client (removed in #9) and not the http4s server framework. The async request helpers (makePostRequestAsync etc.) are fake-async — Future { blocking { syncCall } } wrappers. No real concurrent I/O happens in these suites.
Goal
Fully remove the async test-setup style: convert all async-style suites to ordinary synchronous suites, then delete the async setup traits.
Scope
Keep (do NOT touch)
SendServerRequests async request methods (makeGetRequestAsync / makePostRequestAsync / makePutRequestAsync / makeDeleteRequestAsync / getAPIResponseAsync) — still used by the genuine concurrency tests (code.concurrency.Concurrent*Test, which extend ConcurrentRaceSetup, not ServerSetupAsync).
Convert to sync (9 suites)
- v4_0_0:
PasswordRecoverTest, EntitlementTests, BankTests, ConsentTests
- v5_0_0:
BankTests, ConsentRequestTest, ATMTest, UserAuthContextTest, CustomerTest
Conversion patterns:
- Mechanical unwrap —
makeXxxRequestAsync → makeXxxRequest, collapse response map { r => … } into direct response.….
- for-comprehension with real production Futures (v4/v5
BankTests) — Await.result the genuine NewStyle.function.* Futures, sync test requests, inline assertions.
- Pure trait switch — suites that extend an Async trait but already write sync assertions (lifted by
convertAssertionToFutureAssertion): just switch VxxxServerSetupAsync → VxxxServerSetup.
Delete (6 files)
v3_0_0/WarehouseTestAsync.scala (redundant with existing sync WarehouseTest)
v3_0_0/V300ServerSetupAsync.scala
v3_1_0/V310ServerSetupAsync.scala (already dead — zero references)
v4_0_0/V400ServerSetupAsync.scala
v5_0_0/V500ServerSetupAsync.scala
setup/ServerSetupAsync.scala (both ServerSetupAsync + ServerSetupWithTestDataAsync)
Verification
mvn test-compile zero errors
- Affected v3/v4/v5 suites green
- Concurrency tests still green (async helpers retained)
- Full local
run_tests_parallel.sh gate green
Background
During the dispatch-core → OkHttp3 migration (#9, PR #28), a family of
*ServerSetupAsynctest-setup traits and async-style test suites survived in the test tree.Clarification: the "Async" here is ScalaTest's
AsyncFeatureSpectest-writing style (test bodies returnFuture[Assertion]), not the dispatch/AsyncHttpClient HTTP client (removed in #9) and not the http4s server framework. The async request helpers (makePostRequestAsyncetc.) are fake-async —Future { blocking { syncCall } }wrappers. No real concurrent I/O happens in these suites.Goal
Fully remove the async test-setup style: convert all async-style suites to ordinary synchronous suites, then delete the async setup traits.
Scope
Keep (do NOT touch)
SendServerRequestsasync request methods (makeGetRequestAsync/makePostRequestAsync/makePutRequestAsync/makeDeleteRequestAsync/getAPIResponseAsync) — still used by the genuine concurrency tests (code.concurrency.Concurrent*Test, which extendConcurrentRaceSetup, notServerSetupAsync).Convert to sync (9 suites)
PasswordRecoverTest,EntitlementTests,BankTests,ConsentTestsBankTests,ConsentRequestTest,ATMTest,UserAuthContextTest,CustomerTestConversion patterns:
makeXxxRequestAsync→makeXxxRequest, collapseresponse map { r => … }into directresponse.….BankTests) —Await.resultthe genuineNewStyle.function.*Futures, sync test requests, inline assertions.convertAssertionToFutureAssertion): just switchVxxxServerSetupAsync→VxxxServerSetup.Delete (6 files)
v3_0_0/WarehouseTestAsync.scala(redundant with existing syncWarehouseTest)v3_0_0/V300ServerSetupAsync.scalav3_1_0/V310ServerSetupAsync.scala(already dead — zero references)v4_0_0/V400ServerSetupAsync.scalav5_0_0/V500ServerSetupAsync.scalasetup/ServerSetupAsync.scala(bothServerSetupAsync+ServerSetupWithTestDataAsync)Verification
mvn test-compilezero errorsrun_tests_parallel.shgate green