Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class CouchbaseTest extends CamelMainTestSupport {
@BeforeAll
static void init() {
CLUSTER = Cluster.connect(
SERVICE.getConnectionString(), SERVICE.getUsername(), SERVICE.getPassword()
SERVICE.getConnectionString(), SERVICE.username(), SERVICE.password()
);
DesignDocument designDoc = new DesignDocument(
CouchbaseConstants.DEFAULT_DESIGN_DOCUMENT_NAME,
Expand All @@ -84,10 +84,10 @@ static void destroy() {
public void configureContext(CamelContextConfiguration camelContextConfiguration) {
super.configureContext(camelContextConfiguration);
Properties overridenProperties = asProperties(
"couchbase.host", SERVICE.getHostname(),
"couchbase.port", Integer.toString(SERVICE.getPort()),
"couchbase.username", SERVICE.getUsername(),
"couchbase.password", SERVICE.getPassword(),
"couchbase.host", SERVICE.hostname(),
"couchbase.port", Integer.toString(SERVICE.port()),
"couchbase.username", SERVICE.username(),
"couchbase.password", SERVICE.password(),
"couchbase.bucket", BUCKET);
camelContextConfiguration.withUseOverridePropertiesWithPropertiesComponent(overridenProperties);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ protected CamelContext createCamelContext() throws Exception {

public void setupResources() throws Exception {
// Replace the from endpoint to send messages easily
// still use the deprecated method for now as method is not visible camelContextConfiguration().replaceRouteFromWith("input", "direct:in");
replaceRouteFromWith("input", "direct:in");
camelContextConfiguration().replaceRouteFromWith("input", "direct:in");
super.setupResources();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ public void configureContext(CamelContextConfiguration camelContextConfiguration
@Override
public void setupResources() throws Exception {
// Prevent failure by replacing the failing endpoint
// still use the deprecated method for now as method is not visible camelContextConfiguration().replaceRouteFromWith("netty", "direct:foo");
replaceRouteFromWith("netty", "direct:foo");
camelContextConfiguration().replaceRouteFromWith("netty", "direct:foo");
super.setupResources();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,14 @@
class MongoDBTest extends CamelMainTestSupport {

private static final String BASE_URI = "http://localhost:8081";
private static final String MONGODB_URL_PREFIX = "mongodb://";

@RegisterExtension
private static final MongoDBService SERVICE = MongoDBServiceFactory.createService();

@Override
protected void bindToRegistry(Registry registry) throws Exception {
registry.bind("myDb", MongoClients.create(SERVICE.getReplicaSetUrl()));
registry.bind("myDb", MongoClients.create(MONGODB_URL_PREFIX + SERVICE.hosts()));
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class LiveLocationUsage implements TelegramMethodUsage {
public void run(CamelContext context) throws InterruptedException {
ProducerTemplate template = context.createProducerTemplate();
SendLocationMessage msg = new SendLocationMessage(latitude, longitude);
msg.setLivePeriod(new Integer(60));
msg.setLivePeriod(Integer.valueOf(60));
MessageResult firstLocationMessage = template.requestBody("direct:start", msg, MessageResult.class);
System.out.println(firstLocationMessage);

Expand Down