Helpers: avoid allocating new timers (#1224)
This commit is contained in:
committed by
GitHub
parent
8e077b46a7
commit
04d082cb49
@ -637,8 +637,6 @@ test('Flush interval', t => {
|
||||
|
||||
test('Flush interval - early stop', t => {
|
||||
t.plan(3)
|
||||
const clock = FakeTimers.install({ toFake: ['setTimeout', 'clearTimeout'] })
|
||||
t.teardown(() => clock.uninstall())
|
||||
|
||||
const MockConnection = connection.buildMockConnection({
|
||||
onRequest (params) {
|
||||
@ -672,7 +670,6 @@ test('Flush interval - early stop', t => {
|
||||
})
|
||||
|
||||
setImmediate(() => {
|
||||
clock.next()
|
||||
m.search({ index: 'test' }, { query: { match: { foo: 'bar' } } }, (err, result) => {
|
||||
t.ok(err instanceof errors.ConfigurationError)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user