8000 Merge branch 'devel' of github.com:arangodb/arangodb into devel · lethalbrains/arangodb@3457e7e · GitHub
[go: up one dir, main page]

Skip to content

Commit 3457e7e

Browse files
committed
Merge branch 'devel' of github.com:arangodb/arangodb into devel
2 parents 6c7abc7 + f15e710 commit 3457e7e

File tree

2 files changed

+22
-22
lines changed

2 files changed

+22
-22
lines changed

js/client/tests/shell-request.js

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ function RequestSuite () {
6363

6464
testDeleteMethod: function () {
6565
var path = '/lol';
66-
var res = request.delete(buildUrl(path));
66+
var res = request.delete(buildUrl(path), {timeout: 300});
6767
expect(res).to.be.a(request.Response);
6868
expect(res.body).to.be.a('string');
6969
expect(Number(res.headers['content-length'])).to.equal(res.rawBody.length);
@@ -77,7 +77,7 @@ function RequestSuite () {
7777

7878
testGetMethod: function () {
7979
var path = '/lol';
80-
var res = request.get(buildUrl(path));
80+
var res = request.get(buildUrl(path), {timeout: 300});
8181
expect(res).to.be.a(request.Response);
8282
expect(res.body).to.be.a('string');
8383
expect(Number(res.headers['content-length'])).to.equal(res.rawBody.length);
@@ -91,7 +91,7 @@ function RequestSuite () {
9191

9292
testHeadMethod: function () {
9393
var path = '/lol';
94-
var res = request.head(buildUrl(path));
94+
var res = request.head(buildUrl(path), {timeout: 300});
9595
expect(res).to.be.a(request.Response);
9696
expect(res.body).to.be.empty();
9797
},
@@ -102,7 +102,7 @@ function RequestSuite () {
102102

103103
testPostMethod: function () {
104104
var path = '/lol';
105-
var res = request.post(buildUrl(path));
105+
var res = request.post(buildUrl(path), {timeout: 300});
106106
expect(res).to.be.a(request.Response);
107107
expect(res.body).to.be.a('string');
108108
expect(Number(res.headers['content-length'])).to.equal(res.rawBody.length);
@@ -117,7 +117,7 @@ function RequestSuite () {
117117
testPatchMethod: function () {
118118
var path = '/lol';
119119
var body = {hello: 'world'};
120-
var res = request.post(buildUrl(path), {body: body, json: true});
120+
var res = request.post(buildUrl(path), {body: body, json: true, timeout: 300});
121121
expect(res).to.be.a(request.Response);
122122
expect(Number(res.headers['content-length'])).to.equal(res.rawBody.length);
123123
expect(res.body).to.be.an('object');
@@ -134,7 +134,7 @@ function RequestSuite () {
134134
testPutMethod: function () {
135135
var path = '/lol';
136136
var body 1E0A = {hello: 'world'};
137-
var res = request.put(buildUrl(path), {body: body, json: true});
137+
var res = request.put(buildUrl(path), {body: body, json: true, timeout: 300});
138138
expect(res).to.be.a(request.Response);
139139
expect(Number(res.headers['content-length'])) F438 .to.equal(res.rawBody.length);
140140
expect(res.body).to.be.an('object');
@@ -155,7 +155,7 @@ function RequestSuite () {
155155
'content-disposition': 'x-chaotic; mood=cheerful',
156156
'x-hovercraft': 'full-of-eels'
157157
};
158-
var res = request.post(buildUrl(path), {headers: headers});
158+
var res = request.post(buildUrl(path), {headers: headers, timeout: 300});
159159
expect(res).to.be.a(request.Response);
160160
var obj = JSON.parse(res.body);
161161
expect(obj.path).to.equal(path);
@@ -174,7 +174,7 @@ function RequestSuite () {
174174
var qstring = {
175175
hovercraft: ['full', 'of', 'eels']
176176
};
177-
var res = request.post(buildUrl(path), {qs: qstring});
177+
var res = request.post(buildUrl(path), {qs: qstring, timeout: 300});
178178
expect(res).to.be.a(request.Response);
179179
var obj = JSON.parse(res.body);
180180
var urlObj = url.parse(obj.url);
@@ -187,7 +187,7 @@ function RequestSuite () {
187187
var qstring = {
188188
hovercraft: ['full', 'of', 'eels']
189189
};
190-
var res = request.post(buildUrl(path), {qs: qstring, useQuerystring: true});
190+
var res = request.post(buildUrl(path), {qs: qstring, useQuerystring: true, timeout: 300});
191191
expect(res).to.be.a(request.Response);
192192
var obj = JSON.parse(res.body);
193193
var urlObj = url.parse(obj.url);
@@ -200,7 +200,7 @@ function RequestSuite () {
200200
var qstring = qs.stringify({
201201
hovercraft: ['full', 'of', 'eels']
202202
});
203-
var res = request.post(buildUrl(path), {qs: qstring});
203+
var res = request.post(buildUrl(path), {qs: qstring, timeout: 300});
204204
expect(res).to.be.a(request.Response);
205205
var obj = JSON.parse(res.body);
206206
var urlObj = url.parse(obj.url);
@@ -238,7 +238,7 @@ function RequestSuite () {
238238

239239
testBadJson: function () {
240240
var url = buildUrl('/_admin/aardvark/standalone.html', false);
241-
var res = request.get(url, {json: true});
241+
var res = request.get(url, {json: true, timeout: 300});
242242
expect(res).to.be.a(request.Response);
243243
expect(res.body).to.be.a('string');
244244
},
@@ -253,7 +253,7 @@ function RequestSuite () {
253253
username: 'jcd',
254254
password: 'bionicman'
255255
};
256-
var res = request.post(buildUrl(path), {auth: auth});
256+
var res = request.post(buildUrl(path), {auth: auth, timeout: 300});
257257
expect(res).to.be.a(request.Response);
258258
var obj = JSON.parse(res.body);
259259
expect(obj.path).to.equal(path);
@@ -272,7 +272,7 @@ function RequestSuite () {
272272
};
273273
var res = request.post(buildUrl(path).replace(/^(https?:\/\/)/, function (m) {
274274
return m + encodeURIComponent(auth.username) + ':' + encodeURIComponent(auth.password) + '@';
275-
}));
275+
}), {timeout: 300});
276276
expect(res).to.be.a(request.Response);
277277
var obj = JSON.parse(res.body);
278278
expect(obj.path).to.equal(path);
@@ -288,7 +288,7 @@ function RequestSuite () {
288288
var auth = {
289289
bearer: 'full of bears'
290290
};
291-
var res = request.post(buildUrl(path), {auth: auth});
291+
var res = request.post(buildUrl(path), {auth: auth, timeout: 300});
292292
expect(res).to.be.a(request.Response);
293293
var obj = JSON.parse(res.body);
294294
expect(obj.path).to.equal(path);
@@ -308,7 +308,7 @@ function RequestSuite () {
308308
answer: 42,
309309
hovercraft: ['full', 'of', 'eels']
310310
};
311-
var res = request.post(buildUrl(path), {body: reqBody, json: true});
311+
var res = request.post(buildUrl(path), {body: reqBody, json: true, timeout: 300});
312312
expect(res).to.be.a(request.Response);
313313
expect(res.body).to.be.an('object');
314314
var obj = res.body;
@@ -324,7 +324,7 @@ function RequestSuite () {
324324
answer: '42',
325325
hovercraft: ['full', 'of', 'eels']
326326
};
327-
var res = request.post(buildUrl(path), {form: reqBody});
327+
var res = request.post(buildUrl(path), {form: reqBody, timeout: 300});
328328
expect(res).to.be.a(request.Response);
329329
var obj = JSON.parse(res.body);
330330
expect(obj.path).to.equal(path);
@@ -339,7 +339,7 @@ function RequestSuite () {
339339
answer: '42',
340340
hovercraft: ['full', 'of', 'eels']
341341
};
342-
var res = request.post(buildUrl(path), {form: reqBody, useQuerystring: true});
342+
var res = request.post(buildUrl(path), {form: reqBody, useQuerystring: true, timeout: 300});
343343
expect(res).to.be.a(request.Response);
344344
var obj = JSON.parse(res.body);
345345
expect(obj.path).to.equal(path);
@@ -354,7 +354,7 @@ function RequestSuite () {
354354
answer: '42',
355355
hovercraft: ['full', 'of', 'eels']
356356
};
357-
var res = request.post(buildUrl(path), {form: qs.stringify(reqBody)});
357+
var res = request.post(buildUrl(path), {form: qs.stringify(reqBody), timeout: 300});
358358
expect(res).to.be.a(request.Response);
359359
var obj = JSON.parse(res.body);
360360
expect(obj.path).to.equal(path);
@@ -365,7 +365,7 @@ function RequestSuite () {
365365
testStringBody: function () {
366366
var path = '/lol';
367367
var reqBody = 'hello world';
368-
var res = request.post(buildUrl(path), {body: reqBody});
368+
var res = request.post(buildUrl(path), {body: reqBody, timeout: 300});
369369
expect(res).to.be.a(request.Response);
370370
var obj = JSON.parse(res.body);
371371
expect(obj.path).to.equal(path);
@@ -377,7 +377,7 @@ function RequestSuite () {
377377
var path = '/lol';
378378
var reqBody = new Buffer('hello world');
379379
var headers = {'content-type': 'application/octet-stream'};
380-
var res = request.post(buildUrl(path), {body: reqBody, headers: headers});
380+
var res = request.post(buildUrl(path), {body: reqBody, headers: headers, timeout: 300});
381381
expect(res).to.be.a(request.Response);
382382
var obj = JSON.parse(res.body);
383383
expect(obj.path).to.equal(path);
@@ -387,7 +387,7 @@ function RequestSuite () {
387387

388388
testBufferResponse: function () {
389389
var path = '/_admin/aardvark/favicon.ico';
390-
var res = request.get(buildUrl(path, false), {encoding: null});
390+
var res = request.get(buildUrl(path, false), {encoding: null, timeout: 300});
391391
expect(res).to.be.a(request.Response);
392392
expect(res.body).to.be.a(Buffer);
393393
}

js/server/modules/org/arangodb/foxx/query.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ exports.createQuery = function createQuery (cfg) {
5252
params = [params];
5353
}
5454

55-
if (params && !params.each(function (v) {return typeof v === 'string';})) {
55+
if (params && !params.every(function (v) {return typeof v === 'string';})) {
5656
throw new Error('Argument names must be a string, an array of strings or false.');
5757
}
5858

0 commit comments

Comments
 (0)
0