| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Testlib.ModService
Synopsis
- withModifiedBackend :: HasCallStack => ServiceOverrides -> (HasCallStack => String -> App a) -> App a
- startDynamicBackend :: HasCallStack => BackendResource -> ServiceOverrides -> Codensity App String
- startDynamicBackends :: HasCallStack => [ServiceOverrides] -> ([String] -> App a) -> App a
- startDynamicBackendsReturnResources :: HasCallStack => [ServiceOverrides] -> ([BackendResource] -> App a) -> App a
- traverseConcurrentlyCodensity :: (HasCallStack => a -> Codensity App ()) -> HasCallStack => [a] -> Codensity App ()
- defaultOverrides :: BackendResource -> ServiceOverrides
- readAndUpdateConfig :: ServiceOverrides -> BackendResource -> Service -> App (IO Value)
- logToConsole :: (String -> String) -> String -> Handle -> IO ()
- warmupFederation :: HasCallStack => App ()
Documentation
withModifiedBackend :: HasCallStack => ServiceOverrides -> (HasCallStack => String -> App a) -> App a Source #
startDynamicBackend :: HasCallStack => BackendResource -> ServiceOverrides -> Codensity App String Source #
startDynamicBackends :: HasCallStack => [ServiceOverrides] -> ([String] -> App a) -> App a Source #
startDynamicBackendsReturnResources :: HasCallStack => [ServiceOverrides] -> ([BackendResource] -> App a) -> App a Source #
traverseConcurrentlyCodensity :: (HasCallStack => a -> Codensity App ()) -> HasCallStack => [a] -> Codensity App () Source #
Concurrent traverse in the 'Codensity App' monad.
readAndUpdateConfig :: ServiceOverrides -> BackendResource -> Service -> App (IO Value) Source #
warmupFederation :: HasCallStack => App () Source #
Pre-warm the static domain1 - domain2 federation path once, before
the test suite bursts. ensureBackendReachable only warms dynamic backends
(it skips the two static domains), so the very first cross-domain call
between them can fail with a transient federator-transport error
(521 connection refused, 525 SSL, 533 unreachable backend). Polling the
federator ingress in both directions here removes that cold-start race
globally, rather than retrying individual requests whose execution order is
not guaranteed.