Skip to content

Commit 72aad58

Browse files
Introduce a check to skip conflict-producing test on instrumented server builds (#835)
1 parent f71ae31 commit 72aad58

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/test/31-conflicts.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,17 @@ describe("config.maxRetries", () => {
5858
});
5959
describe("when set to 100", () => {
6060
it("should avoid conflicts", async () => {
61+
// This test creates, by design, a lot of conflicts and retries until its successfull
62+
// On instrumented server builds this test has a very high chance on running for a long time
63+
// and hitting the test-timeouts. To still test this behaviour on normal builds we do a check here and
64+
// continue only when its not a asan/tsan/coverage build.
65+
const version = await db.version(true);
66+
if (version.details !== undefined
67+
&& (version.details['asan'] === 'true'
68+
|| version.details['tsan'] === 'true'
69+
|| version.details['coverage'] === 'true')) {
70+
return;
71+
}
6172
await Promise.all(
6273
range(1_000).map(() =>
6374
db.query(

0 commit comments

Comments
 (0)