Skip to content

Instantly share code, notes, and snippets.

@dnno
Created February 25, 2018 10:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dnno/6b0ced5dda343872f1429a14dbcf9598 to your computer and use it in GitHub Desktop.
Save dnno/6b0ced5dda343872f1429a14dbcf9598 to your computer and use it in GitHub Desktop.
@ClassRule
public static GenericContainer infinispan =
new GenericContainer("jboss/infinispan-server:9.1.3.Final");
@Before
public void setup(){
cacheManager = new RemoteCacheManager(new ConfigurationBuilder()
.addServers(getServerAddress())
.version(ProtocolVersion.PROTOCOL_VERSION_26)
.build());
}
@Test
public void should_be_able_to_retrieve_a_cache() {
assertNotNull(cacheManager.getCache());
}
private String getServerAddress() {
return infinispan.getContainerIpAddress() + ":"
+ infinispan.getMappedPort(11222);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment