Browse Source

fix context related test issue

Shelikhoo 4 years ago
parent
commit
758290314f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/proxyman/outbound/handler_test.go

+ 1 - 1
app/proxyman/outbound/handler_test.go

@@ -70,7 +70,7 @@ func TestOutboundWithStatCounter(t *testing.T) {
 
 	v, _ := core.New(config)
 	v.AddFeature((outbound.Manager)(new(Manager)))
-	ctx := context.WithValue(context.Background(), v2rayKey, v)
+	ctx := mustToContextForced(context.Background(), v)
 	h, _ := NewHandler(ctx, &core.OutboundHandlerConfig{
 		Tag:           "tag",
 		ProxySettings: serial.ToTypedMessage(&freedom.Config{}),