Skip to content

Commit a3689e0

Browse files
committed
test(core): restore the previous waitpoint backend on harness teardown
1 parent 410f28d commit a3689e0

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

packages/core/src/v3/test/session-waitpoint-backend.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ export function installSessionWaitpointBackend(apiClient: ApiClient): {
211211
restore: () => void;
212212
} {
213213
const backend = new SessionWaitpointBackend(apiClient);
214+
const previousBackend = activeBackend;
214215
activeBackend = backend;
215216

216217
if (patchDepth === 0) {
@@ -252,7 +253,7 @@ export function installSessionWaitpointBackend(apiClient: ApiClient): {
252253
restored = true;
253254
backend.disable();
254255
if (activeBackend === backend) {
255-
activeBackend = undefined;
256+
activeBackend = previousBackend;
256257
}
257258
patchDepth -= 1;
258259
if (patchDepth === 0 && originalCreate && originalWait) {

0 commit comments

Comments
 (0)