Skip to content

Refresh lock unit testing (via miniredis)#90

Closed
iSerganov wants to merge 1 commit into
bsm:mainfrom
iSerganov:main
Closed

Refresh lock unit testing (via miniredis)#90
iSerganov wants to merge 1 commit into
bsm:mainfrom
iSerganov:main

Conversation

@iSerganov
Copy link
Copy Markdown
Contributor

Why

The new miniredis test pack covers ~18 cases cheaply with no external dependency (multi-key, nil receiver, value preservation, ctx-cancelled-mid-retry, spy-verified NextBackoff call counts) — that breadth would be painful to replicate against real Redis. Whereas the existing tests in redislock_test.go cover only ~6 scenarios and verify the actual Lua scripts run correctly against real Redis. So IMHO, this looks like a good addition to existing test cases.

@iSerganov
Copy link
Copy Markdown
Contributor Author

@dim, as agreed sending you miniredis-based Refresh unit tests.

@dim
Copy link
Copy Markdown
Member

dim commented May 19, 2026

I think it only makes sense to switch to miniredis if we update all our tests to it. It's a bit strange to have part of it still using the real server.

@dim
Copy link
Copy Markdown
Member

dim commented May 19, 2026

How do you feel about #91?

@iSerganov
Copy link
Copy Markdown
Contributor Author

How do you feel about #91?

Yep, that's a good idea! Closing this one.

@iSerganov iSerganov closed this May 20, 2026
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.

2 participants