Pass in context to lease done function in client
Allows the client to choose the context to finish the lease. This allows the client to switch contexts when the main context used to the create the lease may have been cancelled. Signed-off-by: Derek McGowan <derek@mcgstyle.net>
This commit is contained in:
@@ -41,7 +41,7 @@ func newContentStore(ctx context.Context, root string) (context.Context, content
|
||||
name = testsuite.Name(ctx)
|
||||
)
|
||||
|
||||
wrap := func(ctx context.Context) (context.Context, func() error, error) {
|
||||
wrap := func(ctx context.Context) (context.Context, func(context.Context) error, error) {
|
||||
n := atomic.AddUint64(&count, 1)
|
||||
ctx = namespaces.WithNamespace(ctx, fmt.Sprintf("%s-n%d", name, n))
|
||||
return client.WithLease(ctx)
|
||||
|
||||
Reference in New Issue
Block a user