Browse Source

Close the producer inline instead of deferring it.

This is a shot in the dark and I doubt it will actually fix anything, but it
should at least kick Travis.
Evan Huus 10 years ago
parent
commit
414f7d26e6
1 changed files with 1 additions and 1 deletions
  1. 1 1
      functional_test.go

+ 1 - 1
functional_test.go

@@ -64,7 +64,6 @@ func TestProducingMessages(t *testing.T) {
 	if err != nil {
 		t.Fatal(err)
 	}
-	defer producer.Close()
 
 	for i := 1; i <= TestBatchSize; i++ {
 		err = producer.SendMessage("single_partition", nil, StringEncoder(fmt.Sprintf("testing %d", i)))
@@ -72,6 +71,7 @@ func TestProducingMessages(t *testing.T) {
 			t.Fatal(err)
 		}
 	}
+	producer.Close()
 
 	events := consumer.Events()
 	for i := 1; i <= TestBatchSize; i++ {