Skip to content

Commit c40ef50

Browse files
committed
Reduce cluster test timeouts
1 parent cb4ac6e commit c40ef50

24 files changed

+52
-48
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"!test/**"
4848
],
4949
"scripts": {
50-
"arango-test": "mocha --reporter json --require source-map-support/register --timeout 60000 build/test",
50+
"arango-test": "mocha --reporter json --require source-map-support/register --timeout 30000 build/test",
5151
"jenkins": "mocha --reporter spec --require source-map-support/register --timeout 0 build/test",
5252
"test": "mocha --reporter spec --require source-map-support/register --timeout 10000 build/test",
5353
"pretest": "yarn build",

src/test/02-accessing-collections.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,15 @@ describe("Accessing collections", function () {
4444
const collection = await db.createCollection(name);
4545
await db.waitForPropagation(
4646
{ path: `/_api/collection/${collection.name}` },
47-
30000
47+
10000
4848
);
4949
}),
5050
...systemCollectionNames.map(async (name) => {
5151
const collection = db.collection(name);
5252
await collection.create({ isSystem: true });
5353
await db.waitForPropagation(
5454
{ path: `/_api/collection/${collection.name}` },
55-
30000
55+
10000
5656
);
5757
}),
5858
] as Promise<void>[]);
@@ -96,22 +96,22 @@ describe("Accessing collections", function () {
9696
const collection = await db.createCollection(name);
9797
await db.waitForPropagation(
9898
{ path: `/_api/collection/${collection.name}` },
99-
30000
99+
10000
100100
);
101101
}),
102102
...edgeCollectionNames.map(async (name) => {
103103
const collection = await db.createEdgeCollection(name);
104104
await db.waitForPropagation(
105105
{ path: `/_api/collection/${collection.name}` },
106-
30000
106+
10000
107107
);
108108
}),
109109
...systemCollectionNames.map(async (name) => {
110110
const collection = db.collection(name);
111111
await collection.create({ isSystem: true });
112112
await db.waitForPropagation(
113113
{ path: `/_api/collection/${collection.name}` },
114-
30000
114+
10000
115115
);
116116
}),
117117
] as Promise<void>[]);

src/test/03-accessing-graphs.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ describe("Accessing graphs", function () {
4040
const collection = await db.createCollection(name);
4141
await db.waitForPropagation(
4242
{ path: `/_api/collection/${collection.name}` },
43-
30000
43+
10000
4444
);
4545
}),
4646
...edgeCollectionNames.map(async (name) => {
4747
const collection = await db.createEdgeCollection(name);
4848
await db.waitForPropagation(
4949
{ path: `/_api/collection/${collection.name}` },
50-
30000
50+
10000
5151
);
5252
}),
5353
] as Promise<void>[]);
@@ -63,7 +63,7 @@ describe("Accessing graphs", function () {
6363
);
6464
await db.waitForPropagation(
6565
{ path: `/_api/gharial/${graph.name}` },
66-
30000
66+
10000
6767
);
6868
}),
6969
]);
@@ -92,14 +92,14 @@ describe("Accessing graphs", function () {
9292
const collection = await db.createCollection(name);
9393
await db.waitForPropagation(
9494
{ path: `/_api/collection/${collection.name}` },
95-
30000
95+
10000
9696
);
9797
}),
9898
...edgeCollectionNames.map(async (name) => {
9999
const collection = await db.createEdgeCollection(name);
100100
await db.waitForPropagation(
101101
{ path: `/_api/collection/${collection.name}` },
102-
30000
102+
10000
103103
);
104104
}),
105105
] as Promise<void>[]);
@@ -115,7 +115,7 @@ describe("Accessing graphs", function () {
115115
);
116116
await db.waitForPropagation(
117117
{ path: `/_api/gharial/${graph.name}` },
118-
30000
118+
10000
119119
);
120120
}),
121121
]);

src/test/04-transactions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ describe("Transactions", () => {
4848
collection = await db.createCollection(`collection-${Date.now()}`);
4949
await db.waitForPropagation(
5050
{ path: `/_api/collection/${collection.name}` },
51-
30000
51+
10000
5252
);
5353
});
5454
afterEach(async () => {

src/test/07-routes.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ describe("Route API", function () {
3737
await db.createDatabase(name);
3838
db.useDatabase(name);
3939
collection = await db.createCollection(`c_${Date.now()}`);
40+
await db.waitForPropagation(
41+
{ path: `/_api/collection/${collection.name}` },
42+
10000
43+
);
4044
});
4145
after(async () => {
4246
try {

src/test/09-collection-metadata.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ describe("Collection metadata", function () {
1717
collection = await db.createCollection(collectionName);
1818
await db.waitForPropagation(
1919
{ path: `/_api/collection/${collection.name}` },
20-
30000
20+
10000
2121
);
2222
});
2323
after(async () => {

src/test/10-manipulating-collections.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ describe("Manipulating collections", function () {
2525
collection = await db.createCollection(`collection-${Date.now()}`);
2626
await db.waitForPropagation(
2727
{ path: `/_api/collection/${collection.name}` },
28-
30000
28+
10000
2929
);
3030
});
3131
afterEach(async () => {
@@ -43,7 +43,7 @@ describe("Manipulating collections", function () {
4343
);
4444
await db.waitForPropagation(
4545
{ path: `/_api/collection/${collection.name}` },
46-
30000
46+
10000
4747
);
4848
const info = await db.collection(collection.name).get();
4949
expect(info).to.have.property("name", collection.name);
@@ -57,7 +57,7 @@ describe("Manipulating collections", function () {
5757
);
5858
await db.waitForPropagation(
5959
{ path: `/_api/collection/${collection.name}` },
60-
30000
60+
10000
6161
);
6262
const info = await db.collection(collection.name).get();
6363
expect(info).to.have.property("name", collection.name);

src/test/11-managing-indexes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ describe("Managing indexes", function () {
1919
collection = await db.createCollection(collectionName);
2020
await db.waitForPropagation(
2121
{ path: `/_api/collection/${collection.name}` },
22-
30000
22+
10000
2323
);
2424
});
2525
after(async () => {

src/test/12-simple-queries.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ describe("Simple queries", function () {
2929
collection = await db.createCollection(`c_${Date.now()}`);
3030
await db.waitForPropagation(
3131
{ path: `/_api/collection/${collection.name}` },
32-
30000
32+
10000
3333
);
3434
await Promise.all(
3535
range(10).map((i) =>

src/test/13-bulk-imports.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ describe("Bulk imports", function () {
1616
collection = await db.createCollection(collectionName);
1717
await db.waitForPropagation(
1818
{ path: `/_api/collection/${collection.name}` },
19-
30000
19+
10000
2020
);
2121
});
2222
after(async () => {

0 commit comments

Comments
 (0)