From 6444b7e24c0204d0b67f99d1ef9669faa0f736c1 Mon Sep 17 00:00:00 2001 From: Asim Aslam Date: Fri, 25 May 2018 15:03:15 +0100 Subject: [PATCH] context cancellation is not required --- function_test.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/function_test.go b/function_test.go index 47bcec7e..d2c828e5 100644 --- a/function_test.go +++ b/function_test.go @@ -13,13 +13,9 @@ func TestFunction(t *testing.T) { var wg sync.WaitGroup wg.Add(1) - // cancellation context - ctx, cancel := context.WithCancel(context.Background()) - // create service fn := NewFunction( Name("test.function"), - Context(ctx), Registry(mock.NewRegistry()), AfterStart(func() error { wg.Done() @@ -51,8 +47,6 @@ func TestFunction(t *testing.T) { if rsp.Status != "ok" { t.Fatalf("function response: %s", rsp.Status) } - - cancel() }() // run service