tkobayas commented on code in PR #6258:
URL:
https://github.com/apache/incubator-kie-drools/pull/6258#discussion_r1959023034
##########
drools-reliability/drools-reliability-tests/src/test/java/org/drools/reliability/test/EmbeddedStorageManagerTest.java:
##########
@@ -59,31 +69,17 @@ static boolean isEmbeddedInfinispan() {
@Test
void removeAllSessionCaches_shouldLeaveNonSessionCache() {
- ((InfinispanStorageManager)
StorageManagerFactory.get().getStorageManager()).setEmbeddedCacheManager(new
FakeCacheManager());
-
StorageManagerFactory.get().getStorageManager().removeAllSessionStorages();
-
assertThat(StorageManagerFactory.get().getStorageManager().getStorageNames()).contains("METADATA_0");
+
assertThat(StorageManagerFactory.get().getStorageManager().getStorageNames())
+ .containsExactlyInAnyOrder("METADATA_0",
"___protobuf_metadata", "___script_cache");
}
@Test
void removeCachesBySessionId_shouldRemoveSpecifiedCacheOnly() {
- ((InfinispanStorageManager)
StorageManagerFactory.get().getStorageManager()).setEmbeddedCacheManager(new
FakeCacheManager());
-
StorageManagerFactory.get().getStorageManager().removeStoragesBySessionId("1");
-
assertThat(StorageManagerFactory.get().getStorageManager().getStorageNames()).contains(SESSION_STORAGE_PREFIX
+ "0_" + "epDefault", "METADATA_0");
- }
-
- public static class FakeCacheManager extends DefaultCacheManager {
Review Comment:
While trying to adapt the test code to meet Infinispan 15, I noticed that
this `FakeCacheManager` quite depends on `DefaultCacheManager`, and it's not
actually possible to write "Fake" class in this case. So changed to just use
`DefaultCacheManager` .
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]