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
Unit test for RemoteRepositoryAlivenessCacheManager #1513
Comments
I'd like to give this a go. |
Great! Go ahead and dig in! :) |
Figured it was time to write a short update on this issue so here goes. I've been unable to find the root cause of why the Hazelcast caches aren't persisting in the unit test scenarios. I've tried inspecting the Hazelcast caches through debugging and through the Hazelcast management center. As for the debugging part, I can follow the As for the management center, it seems if I simply start strongbox locally and inspect the Hazelcast cache, then the HazelcastCache does work. See the below screenshot from having started strongbox locally: It only appears there are issues when caching in the unit test. I've reached out to the Hazelcast team, and they've pointed me to the documentation on sharding located here. After having read it, I'm not closer to figuring out why values aren't getting cached. They've also made suggestions in a pull request to the POC project but switching Hazelcast to a multicast configuration hasn't helped either. I'm a bit stuck on this issue to be honest, the tests themselves are fairly easy to write but they're useless if I can't get the Hazelcast cache integration to actually persist when running the unit test. Perhaps someone could try going over this with fresh eyes? You can see my PR for this issue at #1520. Thanks! |
@fuss86 / @sbespalov , Any thoughts/advice on this? |
@mwvdev could you please make sure that your branch compiles without problems ? Here is the result of
and the result of
|
No problem! I don't have too much spare time these days but I don't mind trucking along on that documentation issue at my own pace.
Sure thing, I'll look into it. |
@fuss86 @sbespalov I had an issue with rebasing. @carlspring helped me sort it out - the branch should compile as expected now. |
Hi @mwvdev , it looks like the problem is somehow related with our parent. If you replace
by
then your poc will fail ( |
I've added gist https://gist.github.com/fuss86/cf7ed264c6573814c85ac3ca1512794d comparing 2 parents in your POC. There must be something wrong, please try to analyze it and let us know :) |
Here's a diff run on the dependency trees of the two:
|
I think the main difference is coming from this bit:
Could |
@fuss86 That's great news! Or it's at least a step in the right direction :)
@fuss86 Will do.
@carlspring It seems likely. I'll do a bit of digging around. |
@carlspring Come to think of it, this might also explain why I've only observed this in a test scenario. |
@mwvdev , Would you be able to pick it up from here? |
Yes, I've got a few things to try out now. |
Great! Good luck! :) |
Any help would be appreciated, I've tried everything I could think of and I still haven't been able to identify why this works when using |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@sbespalov : Just a reminder to check, if we can now close this task with your recent changes...? |
POC tests are still failing. |
i'll do it |
Is this issue still open? |
Can i work on this? |
Task Description
We need a Unit Test for
RemoteRepositoryAlivenessCacheManager
functionality.The underlying cache within test should be Hazelcast cache instance (distributed).
Tasks
There should be following test cases:
RemoteRepositoryAlivenessCacheManager.isAlive
returntrue
if there is no cached value for particular repositoryRemoteRepositoryAlivenessCacheManager.isAlive
returntrue
if there is cachedtrue
value for particular repositoryRemoteRepositoryAlivenessCacheManager.isAlive
returnfalse
if there is cachedfalse
value for particular repositoryRemoteRepositoryAlivenessCacheManager.isAlive
returntrue
if cache expiredRemoteRepositoryAlivenessCacheManager.put
immediately changes cached valueUseful Links
Task Relationships
This task:
Help
The text was updated successfully, but these errors were encountered: