rabbitmq / rabbitmq-stream-go-client

A client library for RabbitMQ streams
MIT License
170 stars 20 forks source link

Fix the publish error response #220

Closed Zerpet closed 1 year ago

Zerpet commented 1 year ago

Summary

Gsantomaggio commented 1 year ago

make tests-ci works, but there is some problem with make tests. Am I missing something?

• [FAILED] [0.016 seconds]
Environment [DeferCleanup (Each)] delete stream when there are multiple locators uses different locators when one fails [flaky]
  [DeferCleanup (Each)] /Users/gas/go/pkg/mod/go.uber.org/mock@v0.2.0/gomock/controller.go:102
  [It] /Users/gas/go/src/github.com/rabbitmq/rabbitmq-stream-go-client/pkg/stream/environment_test.go:230

  Timeline >>
  [FAILED] in [DeferCleanup (Each)] - /usr/local/go/src/reflect/value.go:584 @ 08/01/23 14:45:24.408

  Attempt #1 Failed.  Retrying ↺ @ 08/01/23 14:45:24.408

  [FAILED] in [DeferCleanup (Each)] - /usr/local/go/src/reflect/value.go:584 @ 08/01/23 14:45:24.413

  Attempt #2 Failed.  Retrying ↺ @ 08/01/23 14:45:24.413

  [FAILED] in [DeferCleanup (Each)] - /usr/local/go/src/reflect/value.go:584 @ 08/01/23 14:45:24.418
  << Timeline

  [FAILED] missing call(s) to *stream.MockRawClient.IsOpen() /Users/gas/go/src/github.com/rabbitmq/rabbitmq-stream-go-client/pkg/stream/environment_test.go:226
  In [DeferCleanup (Each)] at: /usr/local/go/src/reflect/value.go:584 @ 08/01/23 14:45:24.418

  There were additional failures detected.  To view them in detail run ginkgo -vv
------------------------------
↺ [FLAKEY TEST - TOOK 3 ATTEMPTS TO PASS] [0.020 seconds]
Environment query stream stats when there are multiple locators gives up on non-retryable errors [flaky]
/Users/gas/go/src/github.com/rabbitmq/rabbitmq-stream-go-client/pkg/stream/environment_test.go:402
------------------------------
• [FAILED] [0.023 seconds]
Environment delete stream when there are multiple locators [It] gives up on non-retryable errors [flaky]
/Users/gas/go/src/github.com/rabbitmq/rabbitmq-stream-go-client/pkg/stream/environment_test.go:248

  Timeline >>
  [FAILED] in [It] - /Users/gas/go/src/github.com/rabbitmq/rabbitmq-stream-go-client/pkg/stream/locator.go:74 @ 08/01/23 14:45:24.416
  [FAILED] in [DeferCleanup (Each)] - /usr/local/go/src/reflect/value.go:584 @ 08/01/23 14:45:24.419

  Attempt #1 Failed.  Retrying ↺ @ 08/01/23 14:45:24.421

  [FAILED] in [It] - /Users/gas/go/src/github.com/rabbitmq/rabbitmq-stream-go-client/pkg/stream/locator.go:74 @ 08/01/23 14:45:24.425
  [FAILED] in [DeferCleanup (Each)] - /usr/local/go/src/reflect/value.go:584 @ 08/01/23 14:45:24.427

  Attempt #2 Failed.  Retrying ↺ @ 08/01/23 14:45:24.427

  [FAILED] in [It] - /Users/gas/go/src/github.com/rabbitmq/rabbitmq-stream-go-client/pkg/stream/locator.go:74 @ 08/01/23 14:45:24.433
  [FAILED] in [DeferCleanup (Each)] - /usr/local/go/src/reflect/value.go:584 @ 08/01/23 14:45:24.434
  << Timeline

  [FAILED] Unexpected call to *stream.MockRawClient.IsOpen([]) at /Users/gas/go/src/github.com/rabbitmq/rabbitmq-stream-go-client/pkg/stream/locator.go:74 because: there are no expected calls of the method "IsOpen" for that receiver
  In [It] at: /Users/gas/go/src/github.com/rabbitmq/rabbitmq-stream-go-client/pkg/stream/locator.go:74 @ 08/01/23 14:45:24.433

  There were additional failures detected.  To view them in detail run ginkgo -vv
------------------------------

Summarizing 2 Failures:
  [FAIL] Environment [DeferCleanup (Each)] delete stream when there are multiple locators uses different locators when one fails [flaky]
  /usr/local/go/src/reflect/value.go:584
  [FAIL] Environment delete stream when there are multiple locators [It] gives up on non-retryable errors [flaky]
  /Users/gas/go/src/github.com/rabbitmq/rabbitmq-stream-go-client/pkg/stream/locator.go:74

Ran 35 of 36 Specs in 0.065 seconds
FAIL! -- 33 Passed | 2 Failed | 1 Flaked | 0 Pending | 1 Skipped

Ginkgo ran 4 suites in 8.881112987s

There were failures detected in the following suites:
  stream ./pkg/stream

Test Suite Failed
make: *** [tests] Error 1
➜  rabbitmq-stream-go-client git:(zerpet/fix-publish-error) ✗ 
Gsantomaggio commented 1 year ago

Ok I understood the problem, we filter the flaky tests: --label-filter="!flaky" on the make tests-ci

Let's ignore it for this PR. Maybe we should investigate how to remove the flaky filter in v2 client.

Zerpet commented 1 year ago

We could add an e2e test to trigger all possible errors from the broker 🤔 I'll create an issue for that