• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

sds / mock_redis / 17114020698
98%

Build:
DEFAULT BRANCH: main
Ran 21 Aug 2025 12:51AM UTC
Jobs 8
Files 27
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

21 Aug 2025 12:50AM UTC coverage: 98.107%. First build
17114020698

push

github

web-flow
Fix `Database.call` with expire methods (#334)

# What?
* It fixes calls to `expire*` methods when the calling happens through
the `.call` method of MockRedis::Database
* It fixes a test that will inconsistently fail when we run tests one
after another, within a few seconds of each run

# Why?
`expire` values are not respected when we set these via the Database
object. So tests that depend on testing that we set the ttl correctly
will fail. This happens because the `.call` method fails to call
successfully `public_send` due to the need to parse out the kwarg
arguments.

# How?
The fix was to identify if we have an `expire` call in the command. If
that is the case, we call a `send_expire` method that will correctly
transform the call so that we can call those methods with the correct
format.

For the test, I noticed that adding a slight wait for 1 millisecond was
enough to consistently get that test passed

# Notes

I didn't add a version number because I didn't want to be be arrogant
and assume that the PR will be passed. I am happy to modify things or
try some other solution if you prefer that.

Thanks so much for such a useful gem

3 of 6 new or added lines in 1 file covered. (50.0%)

1866 of 1902 relevant lines covered (98.11%)

1620.55 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
3
97.52
lib/mock_redis/database.rb
Jobs
ID Job ID Ran Files Coverage
1 ruby3.1-7.0 - 17114020698.1 21 Aug 2025 12:51AM UTC 27
35.65
GitHub Action Run
2 ruby3.2-7.0 - 17114020698.2 21 Aug 2025 12:51AM UTC 27
35.65
GitHub Action Run
3 ruby3.3-6.2 - 17114020698.3 21 Aug 2025 12:51AM UTC 27
97.53
GitHub Action Run
4 ruby3.2-6.2 - 17114020698.4 21 Aug 2025 12:51AM UTC 27
97.53
GitHub Action Run
5 ruby3.0-7.0 - 17114020698.5 21 Aug 2025 12:51AM UTC 27
35.65
GitHub Action Run
6 ruby3.0-6.2 - 17114020698.6 21 Aug 2025 12:51AM UTC 27
97.53
GitHub Action Run
7 ruby3.3-7.0 - 17114020698.7 21 Aug 2025 12:51AM UTC 27
35.67
GitHub Action Run
8 ruby3.1-6.2 - 17114020698.8 21 Aug 2025 12:51AM UTC 27
97.53
GitHub Action Run
Source Files on build 17114020698
  • Tree
  • List 27
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 562e2e46 on github
  • Prev Build on main (#17114015996)
  • Next Build on main (#17114153199)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc