Skip to content

Commit

Permalink
use dev services
Browse files Browse the repository at this point in the history
  • Loading branch information
karesti committed Feb 7, 2024
1 parent 0ee7a8a commit 049bea8
Show file tree
Hide file tree
Showing 13 changed files with 26 additions and 221 deletions.
6 changes: 0 additions & 6 deletions extensions/infinispan/deployment/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,6 @@
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-infinispan-client-deployment</artifactId>
<exclusions>
<exclusion><!-- avoid the mess in its transitives -->
<groupId>org.infinispan</groupId>
<artifactId>infinispan-server-testdriver-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
Expand Down

This file was deleted.

This file was deleted.

11 changes: 0 additions & 11 deletions integration-tests/infinispan-quarkus-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,6 @@
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-junit4-mock</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,12 @@ public class InfinispanQuarkusClientRoutes extends InfinispanCommonRoutes {
@Inject
RemoteCacheManager cacheManager;


@Override
protected Configuration getConfigurationBuilder() {
Config config = ConfigProvider.getConfig();
ConfigurationBuilder clientBuilder = new ConfigurationBuilder();
String[] hostParts = config.getValue("quarkus.infinispan-client.server-list", String.class).split(":");
String[] hostParts = config.getValue("quarkus.infinispan-client.hosts", String.class).split(":");

clientBuilder.addServer()
.host(hostParts[0])
Expand All @@ -51,13 +52,12 @@ protected Configuration getConfigurationBuilder() {
clientBuilder
.security()
.authentication()
.username(config.getValue("quarkus.infinispan-client.auth-username", String.class))
.password(config.getValue("quarkus.infinispan-client.auth-password", String.class))
.username(config.getValue("quarkus.infinispan-client.username", String.class))
.password(config.getValue("quarkus.infinispan-client.password", String.class))
.serverName(config.getValue("quarkus.infinispan-client.auth-server-name", String.class))
.saslMechanism(config.getValue("quarkus.infinispan-client.sasl-mechanism", String.class))
.realm(config.getValue("quarkus.infinispan-client.auth-realm", String.class))
.marshaller(new ProtoStreamMarshaller());

return clientBuilder.build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
## See the License for the specific language governing permissions and
## limitations under the License.
## ---------------------------------------------------------------------------
quarkus.infinispan-client.devservices.enabled=false

# Required by InfinispanRemoteAggregationRepository
quarkus.infinispan-client.cache.camel-infinispan.configuration-resource=camel-infinispan-cache.xml
quarkus.camel.native.reflection.serialization-enabled=true
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<local-cache name="camel-infinispan">
<encoding media-type="application/x-protostream" />
</local-cache>
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/
package org.apache.camel.quarkus.component.infinispan;

import io.quarkus.test.common.QuarkusTestResource;
import io.quarkus.test.junit.QuarkusTest;
import io.restassured.RestAssured;
import org.apache.camel.quarkus.component.infinispan.common.InfinispanCommonTest;
Expand All @@ -26,7 +25,6 @@
import static org.hamcrest.Matchers.notNullValue;

@QuarkusTest
@QuarkusTestResource(InfinispanServerTestResource.class)
public class InfinispanQuarkusClientTest extends InfinispanCommonTest {

@Test
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ Map<String, String> additionalInfinispanConfig() {
if (OS.getCurrentOs().equals(OS.MAC_OS) || OS.getCurrentOs().equals(OS.WINDOWS)) {
config.put(CLIENT_INTELLIGENCE, "BASIC");
}
config.put("infinispan.client.hotrod.cache.camel-infinispan.configuration_uri", "camel-infinispan-cache.xml");
return config;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
## See the License for the specific language governing permissions and
## limitations under the License.
## ---------------------------------------------------------------------------
quarkus.infinispan-client.devservices.enabled=false
quarkus.infinispan-client.devservices.port=31222

# Required by InfinispanRemoteAggregationRepository
quarkus.camel.native.reflection.serialization-enabled=true
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<local-cache name="camel-infinispan">
<encoding media-type="application/x-protostream" />
</local-cache>
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,21 @@
*/
package org.apache.camel.quarkus.component.infinispan;

import java.util.Map;
import io.quarkus.test.common.QuarkusTestResourceLifecycleManager;

import org.apache.camel.quarkus.component.infinispan.common.InfinispanCommonServerTestResource;
import java.util.HashMap;
import java.util.Map;

public class InfinispanServerTestResource extends InfinispanCommonServerTestResource {
public class InfinispanServerTestResource implements QuarkusTestResourceLifecycleManager {

@Override
public Map<String, String> start() {
Map<String, String> config = super.start();
Map<String, String> config = new HashMap<>();

config.put("camel.component.infinispan.autowired-enabled", "false");
config.put("camel.component.infinispan.hosts", getServerList());
config.put("camel.component.infinispan.username", USER);
config.put("camel.component.infinispan.password", PASS);
config.put("camel.component.infinispan.hosts", "localhost:31222");
config.put("camel.component.infinispan.username", "admin");
config.put("camel.component.infinispan.password", "password");
config.put("camel.component.infinispan.secure", "true");
config.put("camel.component.infinispan.security-realm", "default");
config.put("camel.component.infinispan.sasl-mechanism", "DIGEST-MD5");
Expand All @@ -38,4 +39,9 @@ public Map<String, String> start() {

return config;
}

@Override
public void stop() {

}
}

0 comments on commit 049bea8

Please sign in to comment.