Skip to content

Commit

Permalink
let camel compile
Browse files Browse the repository at this point in the history
  • Loading branch information
Croway committed Dec 5, 2024
1 parent 1d3bfa4 commit 47cb84f
Show file tree
Hide file tree
Showing 14 changed files with 89 additions and 27 deletions.
6 changes: 0 additions & 6 deletions components/camel-zookeeper-master/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,6 @@
</dependency>

<!-- test infra -->
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-test-infra-zookeeper</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-test-infra-zookeeper</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,24 @@
import org.apache.camel.Route;
import org.apache.camel.component.file.remote.SftpEndpoint;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.component.zookeepermaster.group.ZookeeprContainer;
import org.apache.camel.test.infra.zookeeper.services.ZooKeeperService;
import org.apache.camel.test.infra.zookeeper.services.ZooKeeperServiceFactory;
import org.apache.camel.test.spring.junit5.CamelSpringTest;
import org.awaitility.Awaitility;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.jupiter.api.extension.RegisterExtension;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;

import static org.junit.jupiter.api.Assertions.assertEquals;

@CamelSpringTest
@ContextConfiguration
@ExtendWith(ZookeeprContainer.class)
public class MasterEndpointIT {

@RegisterExtension
static ZooKeeperService service = ZooKeeperServiceFactory.createService();

@Autowired
protected CamelContext camelContext;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,20 @@
import org.apache.camel.CamelContext;
import org.apache.camel.EndpointInject;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.component.zookeepermaster.group.ZookeeprContainer;
import org.apache.camel.test.infra.zookeeper.services.ZooKeeperService;
import org.apache.camel.test.infra.zookeeper.services.ZooKeeperServiceFactory;
import org.apache.camel.test.spring.junit5.CamelSpringTest;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.jupiter.api.extension.RegisterExtension;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;

@CamelSpringTest
@ContextConfiguration
@ExtendWith(ZookeeprContainer.class)
public class MasterQuartzEndpointIT {
@RegisterExtension
static ZooKeeperService service = ZooKeeperServiceFactory.createService();

@Autowired
protected CamelContext camelContext;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,15 @@
import org.apache.camel.component.zookeepermaster.group.internal.ZooKeeperGroup;
import org.apache.camel.test.AvailablePortFinder;
import org.apache.camel.test.infra.zookeeper.services.ZooKeeperContainer;
import org.apache.camel.test.infra.zookeeper.services.ZooKeeperService;
import org.apache.camel.test.infra.zookeeper.services.ZooKeeperServiceFactory;
import org.apache.curator.framework.CuratorFramework;
import org.apache.curator.framework.CuratorFrameworkFactory;
import org.apache.curator.retry.RetryNTimes;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.jupiter.api.extension.RegisterExtension;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.testcontainers.containers.BindMode;
Expand All @@ -45,8 +47,10 @@
import static org.junit.jupiter.api.Assertions.assertNotEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;

@ExtendWith(ZookeeprContainer.class)
public class GroupIT {
@RegisterExtension
static ZooKeeperService service = ZooKeeperServiceFactory.createService();

private static final Logger LOGGER = LoggerFactory.getLogger(GroupIT.class);

private static String beforeTmpdir;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.camel.test.infra.mosquitto.services;

public class MosquittoRemoteService extends MosquittoRemoteInfraService implements MosquittoService {
public MosquittoRemoteService() {
}

public MosquittoRemoteService(int port) {
super(port);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,4 @@ public static MosquittoService createService() {
.build();
}

public static class MosquittoRemoteService extends MosquittoRemoteInfraService implements MosquittoService {
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import org.testcontainers.containers.GenericContainer;
import org.testcontainers.containers.wait.strategy.Wait;

public class NatsLocalContainerAuthInfraService extends NatsLocalContainerInfraService {
public class NatsLocalContainerAuthService extends NatsLocalContainerService implements NatsService {
private static final String USERNAME = "admin";
private static final String PASSWORD = "password";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import org.testcontainers.containers.GenericContainer;
import org.testcontainers.containers.wait.strategy.Wait;

public class NatsLocalContainerAuthTokenInfraService extends NatsLocalContainerInfraService {
public class NatsLocalContainerAuthTokenService extends NatsLocalContainerService implements NatsService {
public static final String TOKEN = "!admin23456";

protected GenericContainer initContainer(String imageName, String containerName) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.camel.test.infra.nats.services;

public class NatsLocalContainerService extends NatsLocalContainerInfraService implements NatsService {
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import org.testcontainers.containers.GenericContainer;
import org.testcontainers.containers.wait.strategy.Wait;

public class NatsLocalContainerTLSAuthInfraService extends NatsLocalContainerInfraService {
public class NatsLocalContainerTLSAuthService extends NatsLocalContainerService implements NatsService {
/*Certificates used for tests with TLS authentication come from:
*https://github.com/nats-io/jnats/tree/master/src/test/resources */
protected GenericContainer initContainer(String imageName, String containerName) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ public static NatsService createService() {
.build();
}

public static class NatsLocalContainerService extends NatsLocalContainerInfraService implements NatsService {
}

public static class NatsRemoteService extends NatsRemoteInfraService implements NatsService {
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
*/
package org.apache.camel.test.infra.solr.services;

public class SolrLocalContainerCloudInfraService extends SolrLocalContainerInfraService {

public class SolrLocalContainerCloudService extends SolrLocalContainerService implements SolrService {
@Override
public boolean isCloudMode() {
return true;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.camel.test.infra.solr.services;

public class SolrLocalContainerService extends SolrLocalContainerInfraService implements SolrService {
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ public static SolrService createService() {
.build();
}

public static class SolrLocalContainerService extends SolrLocalContainerInfraService implements SolrService {
}

public static class SolrRemoteService extends SolrRemoteInfraService implements SolrService {
}
}

0 comments on commit 47cb84f

Please sign in to comment.