Skip to content

Commit

Permalink
Merge pull request #1602 from joynr/reactivate-unit-tests
Browse files Browse the repository at this point in the history
[Java] Fix unit tests TtlUplift, Shutdown and LocalCommunication

Fix and reactivate 2 unit test classes:

TtlUplift
Shutdown

I've changed a constant in the source code, not just the tests, please review.
The INFINITE_SUBSCRIPTION is now Max value of JavaScript, instead of Max value of Java.

Reviewed-by: szymondabrowskipartner <szymon.dabrowski@partner.bmw.de>
  • Loading branch information
zuul[bot] authored and GitHub Enterprise committed Sep 26, 2024
2 parents 1b7e8a5 + 9629494 commit 4bbc66e
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
import java.util.concurrent.TimeUnit;

import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.ArgumentCaptor;
Expand Down Expand Up @@ -510,7 +509,6 @@ public void testAttributeSubscriptionWithTtlUplift() throws Exception {
any(MessagingQos.class));
}

@Ignore
@SuppressWarnings("unchecked")
@Test(timeout = 3000)
public void testAttributeSubscriptionWithTtlUpliftWithNoExpiryDate() throws Exception {
Expand Down Expand Up @@ -670,7 +668,6 @@ public void testBroadcastSubscriptionWithTtlUplift() throws Exception {
any(MessagingQos.class));
}

@Ignore
@SuppressWarnings("unchecked")
@Test(timeout = 3000)
public void testBroadcastSubscriptionWithTtlUpliftWithNoExpiryDate() throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import java.util.Properties;

import org.junit.Before;
import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.mockito.Mock;
Expand Down Expand Up @@ -130,8 +129,6 @@ public void unregisterMultibleProvidersBeforeShutdown() throws JoynrWaitExpiredE
}

@Test(expected = JoynrShutdownException.class)
@Ignore
// test is taking too long because it is attempting to send deregister requests that are not implemented in the mocks
public void testProxyCallAfterShutdown() throws DiscoveryException, JoynrIllegalStateException,
InterruptedException {
Mockito.when(messageReceiverMock.getChannelId()).thenReturn("ShutdownTestChannelId");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public abstract class SubscriptionQos implements JoynrType {

private long expiryDateMs = NO_EXPIRY_DATE;
public static final int IGNORE_VALUE = -1;
public static final long INFINITE_SUBSCRIPTION = Long.MAX_VALUE;
public static final long INFINITE_SUBSCRIPTION = 9007199254740991L;

/**
* Expiry date value to disable expiration: {@value #NO_EXPIRY_DATE}.
Expand Down

0 comments on commit 4bbc66e

Please sign in to comment.