Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[7.67.x-blue] Bump protostream to 4.6.5 #1426

Merged
merged 3 commits into from
Sep 20, 2024
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
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
<jboss.releases.repo.url>https://repository.jboss.org/nexus/service/local/staging/deploy/maven2/</jboss.releases.repo.url>
<jboss.snapshots.repo.url>https://repository.jboss.org/nexus/content/repositories/snapshots/</jboss.snapshots.repo.url>

<version.org.infinispan.protostream>4.3.5.Final</version.org.infinispan.protostream>
<version.org.infinispan.protostream>4.6.5.Final</version.org.infinispan.protostream>

<!-- Newer version in kie-parent causes ServiceLoader error -->
<version.ch.qos.logback>1.1.3</version.ch.qos.logback>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnitRunner;

import java.util.concurrent.ExecutionException;
import java.util.concurrent.CompletableFuture;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
Expand All @@ -37,23 +37,27 @@
public class InfinispanPingServiceTest {

@Mock(answer = Answers.RETURNS_DEEP_STUBS)
private RemoteCacheImpl remoteCache;
private RemoteCacheImpl<?,?> remoteCache;

@Mock
PingResponse pingResponse;

@Before
public void setUp() throws ExecutionException, InterruptedException {
when(((PingResponse) remoteCache.ping().toCompletableFuture().get()).isSuccess()).thenReturn(true);
public void setUp() {
when(pingResponse.isSuccess()).thenReturn(true);
when(remoteCache.ping().toCompletableFuture()).thenReturn(CompletableFuture.completedFuture(pingResponse));
}

@Test
public void testPingSuccess() throws ExecutionException, InterruptedException {
public void testPingSuccess() {
{
InfinispanPingService service = spy(new InfinispanPingService(remoteCache));
assertTrue(service.ping());
service.stop();
}

{
when(((PingResponse) remoteCache.ping().toCompletableFuture().get()).isSuccess()).thenReturn(false);
when(pingResponse.isSuccess()).thenReturn(false);
InfinispanPingService service = spy(new InfinispanPingService(remoteCache));
assertFalse(service.ping());
service.stop();
Expand Down
Loading