Skip to content

Commit

Permalink
[TT-10375] Remove useless defer calls
Browse files Browse the repository at this point in the history
  • Loading branch information
buraksezer committed Nov 10, 2023
1 parent 76c8ef8 commit 6af54f9
Showing 1 changed file with 0 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ func testWithFactory(factory *Factory) runTestOnTestDefinitionOptions {
func TestKafkaDataSource(t *testing.T) {
factory := &Factory{}
ctx := resolve.NewContext(context.Background())
defer ctx.Context().Done()

t.Run("subscription", runTestOnTestDefinition(`
subscription RemainingJedis {
Expand Down Expand Up @@ -227,7 +226,6 @@ func TestKafkaDataSource_Subscription_Start(t *testing.T) {

t.Run("should return error when input is invalid", func(t *testing.T) {
ctx := resolve.NewContext(context.Background())
defer ctx.Context().Done()

source := SubscriptionSource{client: FailingSubscriptionClient{}}
err := source.Start(ctx.Context(), []byte(`{"broker_addresses":"",topic":"","group_id":""}`), nil)
Expand All @@ -236,7 +234,6 @@ func TestKafkaDataSource_Subscription_Start(t *testing.T) {

t.Run("should send and receive a message, then cancel subscription", func(t *testing.T) {
resolveCtx := resolve.NewContext(context.Background())
defer resolveCtx.Context().Done()

subscriptionLifecycle, cancelSubscription := context.WithCancel(resolveCtx.Context())
resolverLifecycle, cancelResolver := context.WithCancel(context.Background())
Expand Down Expand Up @@ -295,7 +292,6 @@ func TestKafkaConsumerGroupBridge_Subscribe(t *testing.T) {
fr.SetMessageWithKey(topic, defaultPartition, 0, testMessageKey, testMessageValue)

ctx := resolve.NewContext(context.Background())
defer ctx.Context().Done()

cg := NewKafkaConsumerGroupBridge(ctx.Context(), logger()) // use abstractlogger.NoopLogger if there is no available logger.
options := GraphQLSubscriptionOptions{
Expand Down

0 comments on commit 6af54f9

Please sign in to comment.