Skip to content

Commit

Permalink
Upgrades
Browse files Browse the repository at this point in the history
  • Loading branch information
mantzas committed Dec 24, 2023
1 parent baf5fdb commit 539ac1a
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions component/kafka/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,17 @@ func TestKafkaComponent_Success(t *testing.T) {
// return nil
// }
// component := newComponent(t, successTopic1, 3, 10, processorFunc)
component := newComponent(t, successTopic1, 3, 10, func(b Batch) error { return nil })

// // Run Patron with the kafka component
// patronContext, patronCancel := context.WithCancel(context.Background())
// var patronWG sync.WaitGroup
// patronWG.Add(1)
// go func() {
// err := component.Run(patronContext)
// require.NoError(t, err)
// patronWG.Done()
// }()
// Run Patron with the kafka component
patronContext, patronCancel := context.WithCancel(context.Background())
var patronWG sync.WaitGroup
patronWG.Add(1)
go func() {
err := component.Run(patronContext)
require.NoError(t, err)
patronWG.Done()
}()

// // Wait for both consumer and producer to finish processing all the messages.
// consumerWG.Wait()
Expand All @@ -106,9 +107,9 @@ func TestKafkaComponent_Success(t *testing.T) {
// }
// assert.Equal(t, expectedMessages, actualSuccessfulMessages)

// // Shutdown Patron and wait for it to finish
// patronCancel()
// patronWG.Wait()
// Shutdown Patron and wait for it to finish
patronCancel()
patronWG.Wait()

// assert.Len(t, mtr.FinishedSpans(), 100)

Expand Down

0 comments on commit 539ac1a

Please sign in to comment.