Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit e4872f4

Browse files
add clearScroll() test
1 parent f2726b9 commit e4872f4

File tree

1 file changed

+27
-10
lines changed

1 file changed

+27
-10
lines changed

‎test/integration/local.js‎

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,35 @@ const esOptions = {
1414

1515
const client = es.Client(esOptions);
1616

17-
it('should be able to connect', function(done) {
17+
describe('ES', function() {
1818
this.timeout(10000);
1919
this.slow(1000);
2020

21-
client.cluster.health(function (err, res) {
22-
if (err) {
23-
done(err);
24-
return;
25-
}
26-
27-
console.log(res);
21+
it('should be able to connect', done => {
22+
client.cluster.health(function (err, res) {
23+
if (err) {
24+
done(err);
25+
return;
26+
}
27+
28+
console.log(res);
29+
30+
done();
31+
});
32+
});
2833

29-
done();
34+
it('can clearScroll()', () => {
35+
let params = {
36+
scroll: '10s',
37+
size: 0
38+
};
39+
40+
return client.search(params)
41+
.then(result => {
42+
params = {
43+
scrollId: [ result._scroll_id ]
44+
};
45+
return client.clearScroll(params);
46+
});
3047
});
31-
});
48+
})

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /