Skip to content

Commit 9defb27

Browse files
committed
Resolve intermittent SODA test diff
1 parent a840577 commit 9defb27

File tree

10 files changed

+45
-12
lines changed

10 files changed

+45
-12
lines changed

test/soda1.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,10 @@ describe('164. soda1.js', () => {
3636

3737
before(async function() {
3838
const runnable = await sodaUtil.checkPrerequisites();
39-
if (!runnable) this.skip();
40-
39+
if (!runnable) {
40+
this.skip();
41+
return;
42+
}
4143
await sodaUtil.cleanup();
4244
});
4345

test/soda11.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@ describe('179. soda11.js', () => {
3838

3939
before(async function() {
4040
const runnable = await sodaUtil.checkPrerequisites();
41-
if (!runnable) this.skip();
41+
if (!runnable) {
42+
this.skip();
43+
return;
44+
}
4245

4346
await sodaUtil.cleanup();
4447
});

test/soda2.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@ describe('165. soda2.js', () => {
3636

3737
before(async function() {
3838
const runnable = await sodaUtil.checkPrerequisites();
39-
if (!runnable) this.skip();
39+
if (!runnable) {
40+
this.skip();
41+
return;
42+
}
4043

4144
await sodaUtil.cleanup();
4245
});

test/soda3.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ const dbconfig = require('./dbconfig.js');
3333
const sodaUtil = require('./sodaUtil.js');
3434

3535
describe('167. soda3.js', () => {
36+
37+
let isRunnable;
3638
let conn, sd, t_collections;
3739
let t_collectionNames = [
3840
"chris_1", "chris_2", "chris_3", "chris_4",
@@ -41,8 +43,11 @@ describe('167. soda3.js', () => {
4143
];
4244

4345
before('create collections', async function() {
44-
const runnable = await sodaUtil.checkPrerequisites();
45-
if (!runnable) this.skip();
46+
isRunnable = await sodaUtil.checkPrerequisites();
47+
if (!isRunnable) {
48+
this.skip();
49+
return;
50+
}
4651

4752
await sodaUtil.cleanup();
4853

@@ -61,6 +66,8 @@ describe('167. soda3.js', () => {
6166
}); // before
6267

6368
after('drop collections, close connection', async () => {
69+
if (!isRunnable) return;
70+
6471
try {
6572
if (t_collections) {
6673
await Promise.all(

test/soda4.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@ describe('168. soda4.js', () => {
3636

3737
before(async function() {
3838
const runnable = await sodaUtil.checkPrerequisites();
39-
if (!runnable) this.skip();
39+
if (!runnable) {
40+
this.skip();
41+
return;
42+
}
4043

4144
await sodaUtil.cleanup();
4245
});

test/soda5.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@ describe('173. soda5.js', () => {
3838

3939
before(async function() {
4040
const runnable = await sodaUtil.checkPrerequisites();
41-
if (!runnable) this.skip();
41+
if (!runnable) {
42+
this.skip();
43+
return;
44+
}
4245

4346
await sodaUtil.cleanup();
4447
});

test/soda6.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@ describe('174. soda6.js', () => {
3838

3939
before(async function() {
4040
const runnable = await sodaUtil.checkPrerequisites();
41-
if (!runnable) this.skip();
41+
if (!runnable) {
42+
this.skip();
43+
return;
44+
}
4245

4346
await sodaUtil.cleanup();
4447
});

test/soda7.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@ describe('175. soda7.js', () => {
3838

3939
before(async function() {
4040
const runnable = await sodaUtil.checkPrerequisites();
41-
if (!runnable) this.skip();
41+
if (!runnable) {
42+
this.skip();
43+
return;
44+
}
4245

4346
await sodaUtil.cleanup();
4447
});

test/soda8.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@ describe('176. soda8.js', () => {
3838

3939
before(async function() {
4040
const runnable = await sodaUtil.checkPrerequisites();
41-
if (!runnable) this.skip();
41+
if (!runnable) {
42+
this.skip();
43+
return;
44+
}
4245

4346
await sodaUtil.cleanup();
4447
});

test/soda9.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@ describe('177. soda9.js', () => {
3636

3737
before(async function() {
3838
const runnable = await sodaUtil.checkPrerequisites();
39-
if (!runnable) this.skip();
39+
if (!runnable) {
40+
this.skip();
41+
return;
42+
}
4043

4144
await sodaUtil.cleanup();
4245
});

0 commit comments

Comments
 (0)