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

test: convert the example in issue #300 into a test case #302

Merged
merged 9 commits into from
Dec 3, 2021

Conversation

contestjia
Copy link
Contributor

The new commit-id 16df11e can fix the issue

@contestjia
Copy link
Contributor Author

@janisz
I add the example to test suite and make a new PR,Thanks

bigcache_test.go Outdated
MaxEntrySize: 52,
})
cache.Set("a", blob(0xff, 235))
time.Sleep(2 * time.Second)
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should not sleep in tests. Please use mockedClock

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I replaced time.Sleep with mockedClock.Please take a look

bigcache_test.go Outdated Show resolved Hide resolved
@janisz
Copy link
Collaborator

janisz commented Nov 23, 2021

@contestjia Coul you fix formatting to pass linter?

@contestjia
Copy link
Contributor Author

@janisz yes, i fixed

@codecov-commenter
Copy link

codecov-commenter commented Nov 29, 2021

Codecov Report

Merging #302 (06633f2) into master (be11930) will increase coverage by 0.52%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #302      +/-   ##
==========================================
+ Coverage   88.78%   89.30%   +0.52%     
==========================================
  Files          15       15              
  Lines         767      767              
==========================================
+ Hits          681      685       +4     
+ Misses         72       69       -3     
+ Partials       14       13       -1     
Impacted Files Coverage Δ
shard.go 88.49% <0.00%> (+1.58%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update be11930...06633f2. Read the comment docs.

janisz
janisz previously approved these changes Dec 2, 2021
bigcache_test.go Outdated Show resolved Hide resolved
@janisz janisz merged commit 77bbae4 into allegro:master Dec 3, 2021
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