From 96bc6c60bc5136f5e8cacc59e51f3c006cf3ae4d Mon Sep 17 00:00:00 2001 From: Miguel dos Reis Date: Wed, 13 Mar 2024 14:33:40 -0300 Subject: [PATCH] Remove test --- Makefile | 2 ++ extensions/kafka_consumer.go | 1 - extensions/kafka_consumer_test.go | 12 ------------ 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index 4640277..444f185 100644 --- a/Makefile +++ b/Makefile @@ -104,6 +104,7 @@ test-unit: @echo "= Running unit tests... =" @echo "-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=" @echo + @export ACK_GINKGO_RC=true @$(GINKGO) -trace -r --randomizeAllSpecs --randomizeSuites --cover --focus="\[Unit\].*" . @$(MAKE) test-coverage-func @echo @@ -118,6 +119,7 @@ run-integration-test: @echo "= Running integration tests... =" @echo "-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=" @echo + @export ACK_GINKGO_RC=true @ginkgo -trace -r -tags=integration --randomizeAllSpecs --randomizeSuites --focus="\[Integration\].*" . # [Integration] Listener Use From GCM [It] should delete a single token from a game @echo diff --git a/extensions/kafka_consumer.go b/extensions/kafka_consumer.go index 7082aac..8020c8d 100644 --- a/extensions/kafka_consumer.go +++ b/extensions/kafka_consumer.go @@ -291,7 +291,6 @@ func (q *KafkaConsumer) handleError(err error) { "extension": "kafka-consumer", }) l.WithError(err).Error("Error in Kafka connection.") - close(q.stopChannel) } // Cleanup closes kafka consumer connection diff --git a/extensions/kafka_consumer_test.go b/extensions/kafka_consumer_test.go index a39f4bc..08d2a1d 100644 --- a/extensions/kafka_consumer_test.go +++ b/extensions/kafka_consumer_test.go @@ -35,7 +35,6 @@ import ( "github.com/spf13/viper" "github.com/topfreegames/pusher/interfaces" "github.com/topfreegames/pusher/mocks" - . "github.com/topfreegames/pusher/testing" "github.com/topfreegames/pusher/util" ) @@ -143,17 +142,6 @@ var _ = Describe("Kafka Extension", func() { })) Expect(consumer.messagesReceived).To(BeEquivalentTo(1000)) }) - - It("should handle error", func() { - startConsuming() - defer consumer.StopConsuming() - resetError := publishError(kafka.Error{}) - defer resetError() - _, ok := <-consumer.stopChannel - Eventually(consumer.run, 5).Should(BeFalse()) - Expect(ok).Should(BeFalse()) - Expect(hook.Entries).To(ContainLogMessage("Error in Kafka connection.")) - }) }) Describe("Configuration Defaults", func() {