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

Ease mocking of redisService #46

Merged
merged 3 commits into from
Nov 5, 2014
Merged

Conversation

sjurgemeyer
Copy link
Contributor

This change intends to make it easier to override the default wiring by
the redis service. Primarily this will be useful for testing.

The RedisService is now in src, but is wired manually in
RedisGrailsPlugin. Some of the wiring methods that were in
RedisGrailsPlugin have been moved to RedisConfigurationUtil so they can
be more easily accessed by apps using the plugin.

This change intends to make it easier to override the default wiring by
the redis service.  Primarily this will be useful for testing.

The RedisService is now in src, but is wired manually in
RedisGrailsPlugin.  Some of the wiring methods that were in
RedisGrailsPlugin have been moved to RedisConfigurationUtil so they can
be more easily accessed by apps using the plugin.
}
}

"redisService${key}"(serviceClass) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Check for key was removed so that redisService can be wired

@sjurgemeyer sjurgemeyer changed the title Record and rollback keys in a test Ease mocking of redisService Nov 4, 2014
import redis.clients.jedis.JedisPoolConfig
import redis.clients.jedis.JedisSentinelPool
import redis.clients.jedis.Protocol
import grails.plugin.redis.test.TestRedisService
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is a dead import, it's causing the code to not compile for me locally.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ugh, sorry about that. Fixed now.

@tednaleid
Copy link
Contributor

Thanks Shaun. I'm having trouble getting the tests to run cleanly (failing on some hamcrest stuff), but they're also failing on master so I don't think it's something you've introduced.

I won't have time till tonight to dig into it further, but I'll get this released (or let you know if I have questions) then.

@tednaleid tednaleid merged commit 4a5c347 into grails:master Nov 5, 2014
@tednaleid
Copy link
Contributor

It was my issue with the tests. I upgraded to 2.4.4 and everything worked out. Just merged this in and released it as 1.6.0. Thanks for the pull request!

@sjurgemeyer
Copy link
Contributor Author

Thanks Ted!

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.

None yet

2 participants