remote service test added

pull/3782/head
Nikita Koksharov 4 years ago
parent 6496bd0c3b
commit c556d07d34

@ -55,6 +55,17 @@ public class QuarkusRedissonClientResource {
return m.get("1").toString();
}
@GET
@Path("/remoteService")
public String remoteService() {
RRemoteService t = redisson.getRemoteService("test");
t.register(RemService.class, new RemoteServiceImpl());
RemService rs = t.get(RemService.class);
return rs.executeMe();
}
@GET
@Path("/pingAll")
public String pingAll() {

@ -0,0 +1,27 @@
/**
* Copyright (c) 2013-2021 Nikita Koksharov
*
* Licensed 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.redisson.quarkus.client.it;
/**
*
* @author Nikita Koksharov
*
*/
public interface RemService {
String executeMe();
}

@ -0,0 +1,32 @@
/**
* Copyright (c) 2013-2021 Nikita Koksharov
*
* Licensed 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.redisson.quarkus.client.it;
import org.redisson.connection.ConnectionListener;
import java.net.InetSocketAddress;
/**
* @author Nikita Koksharov
*/
public class RemoteServiceImpl implements RemService {
@Override
public String executeMe() {
return "executed";
}
}

@ -0,0 +1,6 @@
[
{
"name":"org.redisson.quarkus.client.it.RemService",
"allDeclaredMethods":true
}
]

@ -11,6 +11,15 @@ import io.quarkus.test.junit.QuarkusTest;
@QuarkusTest
public class QuarkusRedissonClientResourceTest {
@Test
public void testRemoteService() {
given()
.when().get("/quarkus-redisson-client/remoteService")
.then()
.statusCode(200)
.body(is("executed"));
}
@Test
public void testMap() {
given()

Loading…
Cancel
Save