Skip to content

Commit

Permalink
junit5 tests classes not need to be public
Browse files Browse the repository at this point in the history
  • Loading branch information
aklevanets committed Nov 23, 2023
1 parent e62bbd6 commit c391733
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public void connectionIsAttemptedUntilSucceeded() throws Exception {
}

@Test//(timeout = 500)
public void connectionDataIsSend() throws Exception {
void connectionDataIsSend() throws Exception {
final int CONNECTION_REQUESTS = 1;
FakeGatewayListenerImpl impl = new FakeGatewayListenerImpl(fakeGateway, CONNECTION_REQUESTS);
this.fakeGateway.setFakeGatewayListener(impl);
Expand Down Expand Up @@ -164,7 +164,7 @@ public void connectionDataIsSend() throws Exception {
}

@Test//(timeout = 500)
public void onDisconnectedWithExceptionParameter() throws Exception {
void onDisconnectedWithExceptionParameter() throws Exception {
FakeGatewayListenerImpl impl = new FakeGatewayListenerImpl(fakeGateway, 1);
this.fakeGateway.setFakeGatewayListener(impl);
Exception exception = new Exception("The server closed the connection");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public void setUp() throws IOException, JAXBException {

@Test
@Timeout(25)
public void protocolLogsInAndStops() throws InterruptedException, IOException, MessageException, ProtocolException {
void protocolLogsInAndStops() throws InterruptedException, IOException, MessageException, ProtocolException {

LiveScoutSettings settings = DefaultSettingsBuilderHelper.getLiveScout()
.setUsername("1762")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public void tearDown() throws InterruptedException {

@Test
@Timeout(value = 500, unit = TimeUnit.MILLISECONDS)
public void serverNotifiesWhenStartedOrStopped() throws InterruptedException, IOException {
void serverNotifiesWhenStartedOrStopped() throws InterruptedException, IOException {
serverState.startsAs("none");
context.checking(new Expectations() {{
oneOf(listener).onStarted();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public void gatewayConnectsToTheServerWhenServerStarted() throws IOException, In

@Test
@Timeout(3)
public void gatewayDetectWhenServerDropsTheConnection() throws IOException, InterruptedException {
void gatewayDetectWhenServerDropsTheConnection() throws IOException, InterruptedException {
context.checking(new Expectations() {{
oneOf(clientListener).onConnected();
then(clientState.is("connected"));
Expand All @@ -128,7 +128,7 @@ public void gatewayDetectWhenServerDropsTheConnection() throws IOException, Inte

@Test
@Timeout(3)
public void gatewayReconnectsIfConnectionClosed() throws IOException, InterruptedException {
void gatewayReconnectsIfConnectionClosed() throws IOException, InterruptedException {
context.checking(new Expectations() {{
oneOf(clientListener).onConnected();
then(clientState.is("connected"));
Expand Down Expand Up @@ -157,7 +157,7 @@ public void gatewayReconnectsIfConnectionClosed() throws IOException, Interrupte

@Test
@Timeout(3)
public void gatewayReceivesData() throws IOException, InterruptedException, SdkException {
void gatewayReceivesData() throws IOException, InterruptedException, SdkException {
context.checking(new Expectations() {{
oneOf(clientListener).onConnected();
then(clientState.is("connected"));
Expand All @@ -181,7 +181,7 @@ public void gatewayReceivesData() throws IOException, InterruptedException, SdkE

@Test
@Timeout(3)
public void gatewayDisconnectsWhenAliveTimeoutElapses() throws IOException, InterruptedException {
void gatewayDisconnectsWhenAliveTimeoutElapses() throws IOException, InterruptedException {
//This test fails when the debugger is attached because the gateway does not check alive messages
if (DevHelper.isDebuggerAttached()) {
return;
Expand Down Expand Up @@ -222,7 +222,7 @@ public void gatewayDisconnectsWhenAliveTimeoutElapses() throws IOException, Inte

@Test
@Timeout(3)
public void gatewayDoesNotDisconnectIfReceivingAliveMessages() throws IOException, InterruptedException, SdkException {
void gatewayDoesNotDisconnectIfReceivingAliveMessages() throws IOException, InterruptedException, SdkException {
context.checking(new Expectations() {{
oneOf(clientListener).onConnected();
then(clientState.is("connected"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public void setUp() throws IOException, JAXBException {

@Test
@Timeout(5)
public void protocolLogsInAndStops() throws InterruptedException, IOException {
void protocolLogsInAndStops() throws InterruptedException, IOException {
context.checking(new Expectations() {{
allowing(protocolListener).onMessageReceived(with(any(IncomingMessage.class)));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ void gatewayDetectWhenServerDropsTheConnection() throws IOException, Interrupted

@Test
@Timeout(5)//(value = 5000, unit = TimeUnit.MICROSECONDS)
public void gatewayReconnectsIfConnectionClosed() throws IOException, InterruptedException {
void gatewayReconnectsIfConnectionClosed() throws IOException, InterruptedException {
context.checking(new Expectations() {{
oneOf(clientListener).onConnected();
then(clientState.is("connected"));
Expand Down

0 comments on commit c391733

Please sign in to comment.