Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update tests to pass the race detector and linter #130

Merged
merged 5 commits into from
Aug 6, 2024

Conversation

rboyer
Copy link
Member

@rboyer rboyer commented Aug 5, 2024

It now passes:

  • golangci-lint run ./...
  • go test -race ./... -short

The -short is needed because both of TestSendData_VeryLarge and TestSendData_Large fail for timing reasons (since race mode is generally slower) and I was hesitant to rewrite them to be less timing sensitive, so I have them get skipped when in testing short mode for now.

@rboyer rboyer self-assigned this Aug 5, 2024
Should allow them to pass with the race detector.
Let's see if I remember how to yaml
session_test.go Outdated Show resolved Hide resolved
session_test.go Outdated Show resolved Hide resolved
Copy link
Member

@tgross tgross left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
with:
go-version: '1.20'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a more recent version?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just copied and pasted raft's as a basis assuming they're the best maintained shared library. 😬 We can bump it. I'm not really sure what the optimal strategy is for a little library like this with no deps and no-post-1.14 features afaik.

Co-authored-by: Michael Schurter <[email protected]>
@rboyer rboyer merged commit 8bd691f into master Aug 6, 2024
3 checks passed
@rboyer rboyer deleted the rboyer/pass-race-and-lint branch August 6, 2024 16:34
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.

3 participants