Skip to content

Commit

Permalink
Fixed checkstyle issues for integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sacOO7 committed Jan 31, 2024
1 parent 4fded69 commit c93f89d
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 10 deletions.
9 changes: 8 additions & 1 deletion lib/src/test/java/io/ably/lib/test/common/Helpers.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,15 @@
import io.ably.lib.debug.DebugOptions.RawProtocolListener;
import io.ably.lib.http.HttpCore;
import io.ably.lib.http.HttpUtils;
import io.ably.lib.realtime.*;
import io.ably.lib.realtime.Channel;
import io.ably.lib.realtime.Channel.MessageListener;
import io.ably.lib.realtime.ChannelEvent;
import io.ably.lib.realtime.ChannelState;
import io.ably.lib.realtime.ChannelStateListener;
import io.ably.lib.realtime.CompletionListener;
import io.ably.lib.realtime.Connection;
import io.ably.lib.realtime.ConnectionState;
import io.ably.lib.realtime.ConnectionStateListener;
import io.ably.lib.realtime.Presence.PresenceListener;
import io.ably.lib.transport.ConnectionManager;
import io.ably.lib.types.AblyException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,30 @@
import io.ably.lib.types.Message;
import io.ably.lib.types.ProtocolMessage;
import io.ably.lib.util.Log;

import io.ably.lib.util.StringUtils;
import org.hamcrest.Matchers;
import org.junit.Ignore;
import org.junit.Test;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.*;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;

import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.is;
import static org.junit.Assert.*;
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;

public class RealtimeChannelTest extends ParameterizedTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import org.junit.Test;
import org.junit.rules.Timeout;

import java.lang.reflect.Field;
import java.time.Duration;
import java.time.Instant;
import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
import io.ably.lib.realtime.AblyRealtime;
import io.ably.lib.realtime.Channel;
import io.ably.lib.realtime.ChannelState;
import io.ably.lib.realtime.ConnectionEvent;
import io.ably.lib.realtime.ConnectionState;
import io.ably.lib.realtime.ConnectionStateListener;
import io.ably.lib.test.common.Helpers.ChannelWaiter;
import io.ably.lib.test.common.Helpers.CompletionSet;
import io.ably.lib.test.common.Helpers.ConnectionWaiter;
Expand Down Expand Up @@ -899,7 +897,7 @@ public void resume_publish_resend_pending_messages_when_resume_failed() throws A
static class MutableConnectionManager {
ConnectionManager connectionManager;

public MutableConnectionManager(AblyRealtime ablyRealtime) {
MutableConnectionManager(AblyRealtime ablyRealtime) {
this.connectionManager = ablyRealtime.connection.connectionManager;
}

Expand Down Expand Up @@ -1045,7 +1043,6 @@ public void resume_publish_reenter_when_resume_failed() throws AblyException {

for (int i = 3; i < 9; i++) {
assertTrue("Client id isn't there:" + clients[i], sentPresenceMap.containsKey(clients[i]));
senderChannel.presence.enterClient(clients[i],null,presenceCompletion.add());
}
}
}
Expand Down

0 comments on commit c93f89d

Please sign in to comment.