Browse Source

spec: force create network context for proxy tests

deepak1556 6 years ago
parent
commit
d97cf8c438
1 changed files with 6 additions and 1 deletions
  1. 6 1
      spec/api-session-spec.js

+ 6 - 1
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(() => {