From d97cf8c4381e0bf93a7732a3577259dba9faeca7 Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Mon, 29 Oct 2018 18:53:42 +0530 Subject: [PATCH] spec: force create network context for proxy tests --- spec/api-session-spec.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/spec/api-session-spec.js b/spec/api-session-spec.js index deeb2eba2bcf..749f69a7d6e7 100644 --- a/spec/api-session-spec.js +++ b/spec/api-session-spec.js @@ -541,8 +541,13 @@ describe('session module', () => { let server = null let customSession = null - beforeEach(() => { + beforeEach((done) => { customSession = session.fromPartition('proxyconfig') + // FIXME(deepak1556): This is just a hack to force + // creation of request context which in turn initializes + // the network context, can be removed with network + // service enabled. + customSession.clearHostResolverCache(() => done()) }) afterEach(() => {