context cancellation is not required
This commit is contained in:
		| @@ -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 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user