(service: string, label = "e2e")
| 53 | // and retry with backoff. Nothing below this line retries anything the |
| 54 | // scenario is actually asserting on. |
| 55 | export const createEmulatorInstance = (service: string, label = "e2e"): Effect.Effect<string> => |
| 56 | requestInstance(service, label).pipe( |
| 57 | Effect.timeoutOrElse({ |
| 58 | duration: ATTEMPT_TIMEOUT, |
| 59 | orElse: () => |
| 60 | Effect.fail(new EmulatorInstanceError(service, `no response in ${ATTEMPT_TIMEOUT}`)), |
| 61 | }), |
| 62 | Effect.retry( |
| 63 | Schedule.both( |
| 64 | Schedule.exponential("500 millis").pipe(Schedule.jittered), |
| 65 | Schedule.recurs(RETRIES), |
| 66 | ), |
| 67 | ), |
| 68 | // An emulator the suite cannot reach at all is a defect in the run, not a |
| 69 | // product failure the scenario should be asked to model. |
| 70 | Effect.orDie, |
| 71 | ); |
no test coverage detected