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

Add fastForward as a time machine. #14

Merged
merged 3 commits into from
Apr 15, 2017
Merged

Conversation

chowchow316
Copy link
Contributor

@chowchow316 chowchow316 commented Apr 12, 2017

Add a time machine here in order to test EXPIRE.

miniredis.go Outdated
@@ -247,6 +248,12 @@ func (m *Miniredis) TotalConnectionCount() int {
return int(m.srv.Info().TotalConnections())
}

// FastForward proceeds the time of selected db by duration.
func (m *Miniredis) FastForward(duration time.Duration) () {
db := m.db(m.selectedDB)
Copy link
Owner

Choose a reason for hiding this comment

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

FastForward() should be run for every database, not only the selected one.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. Thanks!

@alicebob
Copy link
Owner

I've made branch ttl to have the ttls are nice time.Duration values. Can you base this on that branch?

@chowchow316 chowchow316 changed the base branch from master to ttl April 14, 2017 18:23
@alicebob alicebob merged commit b5189e6 into alicebob:ttl Apr 15, 2017
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