Skip to content

Commit

Permalink
chore: update toxiproxy remove proxy (#382)
Browse files Browse the repository at this point in the history
  • Loading branch information
crystall-bitquill authored Jan 23, 2025
1 parent a4d9d68 commit 1ec01a3
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions tests/integration/container/tests/utils/proxy_helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,14 @@ export class ProxyHelper {
const proxy = proxyInfo.proxy;

if (proxy !== undefined) {
const toxics = proxy.toxics;
toxics.forEach((toxic) => {
toxic.remove();
});
try {
const upstreamToxic = await proxy.getToxic("UP-STREAM");
await upstreamToxic.remove();
const downstreamToxic = await proxy.getToxic("DOWN-STREAM");
await downstreamToxic.remove();
} catch (e) {
// Ignore
}
}
}
}

0 comments on commit 1ec01a3

Please sign in to comment.