瀏覽代碼

fix context related test issue

Shelikhoo 4 年之前
父節點
當前提交
758290314f
共有 1 個文件被更改,包括 1 次插入1 次删除
  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{}),