Skip to content

fix(address): support clustered usage - #40

Merged
appleboy merged 2 commits into
mainfrom
bugs
Dec 5, 2023
Merged

appleboy merged 2 commits into
mainfrom
bugs

Conversation

@appleboy

@appleboy appleboy commented Dec 5, 2023 •

Copy link
Copy Markdown
Member
  • Add github.com/nats-io/nats.go as an import
  • Change the WithAddr function signature to accept multiple addresses
  • Modify the WithAddr function to join multiple addresses with commas
  • Change the default address value to nats.DefaultURL

fix #35

@appleboy appleboy changed the title feat: refactor GitHub Actions and modify NATS tests fix(address): support clustered usage Dec 5, 2023
@codecov-commenter

codecov-commenter commented Dec 5, 2023 •

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (da75368) 80.90% compared to head (928a21d) 81.08%.
Report is 8 commits behind head on main.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #40      +/-   ##
==========================================
+ Coverage   80.90%   81.08%   +0.17%     
==========================================
  Files           2        2              
  Lines         110      111       +1     
==========================================
+ Hits           89       90       +1     
  Misses         14       14              
  Partials        7        7              
Flag Coverage Δ
go-1.17 ?
go-1.18 81.08% <100.00%> (+0.17%) ⬆️
go-1.19 81.08% <100.00%> (+0.17%) ⬆️
go-1.20 81.08% <100.00%> (?)
go-1.21 81.08% <100.00%> (?)
ubuntu-latest 81.08% <100.00%> (+0.17%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

- Add `github.com/nats-io/nats.go` as an import
- Change the `WithAddr` function signature to accept multiple addresses
- Modify the `WithAddr` function to join multiple addresses with commas
- Change the default address value to `nats.DefaultURL`

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
- Modify the `go.yml` file in the `.github/workflows` directory
- Add a new job called `nats01` in the `go.yml` file
- Add a new job called `nats02` in the `go.yml` file
- Modify the `.golangci.yml` file
- Modify the `nats_test.go` file
- Modify the `TestDefaultFlow` function in the `nats_test.go` file
- Add a new function called `TestClusteredHost` in the `nats_test.go` file
- Modify the `TestShutdown` function in the `nats_test.go` file
- Modify the `TestCustomFuncAndWait` function in the `nats_test.go` file
- Modify the `TestEnqueueJobAfterShutdown` function in the `nats_test.go` file
- Modify the `TestJobReachTimeout` function in the `nats_test.go` file
- Modify the `TestCancelJobAfterShutdown` function in the `nats_test.go` file
- Modify the `TestGoroutineLeak` function in the `nats_test.go` file
- Modify the `TestGoroutinePanic` function in the `nats_test.go` file
- Modify the `TestReQueueTaskInWorkerBeforeShutdown` function in the `nats_test.go` file

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
@appleboy
appleboy merged commit f2d7441 into main Dec 5, 2023
appleboy added a commit that referenced this pull request Dec 5, 2023
* feat: refactor `WithAddr` function to accept multiple addresses

- Add `github.com/nats-io/nats.go` as an import
- Change the `WithAddr` function signature to accept multiple addresses
- Modify the `WithAddr` function to join multiple addresses with commas
- Change the default address value to `nats.DefaultURL`

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can't use a cluster obviously

2 participants