Skip to content

Commit

Permalink
Submitted one more file by mistake
Browse files Browse the repository at this point in the history
  • Loading branch information
tishun committed May 27, 2024
1 parent ec54717 commit 1e21d42
Showing 1 changed file with 9 additions and 31 deletions.
40 changes: 9 additions & 31 deletions src/test/java/io/lettuce/core/SocketOptionsIntegrationTests.java
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
package io.lettuce.core;

import io.lettuce.test.LettuceExtension;
import io.netty.channel.ConnectTimeoutException;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.fail;

import javax.inject.Inject;
import java.net.SocketException;
import java.util.concurrent.TimeUnit;

import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.fail;
import javax.inject.Inject;

import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;

import io.lettuce.test.LettuceExtension;
import io.netty.channel.ConnectTimeoutException;

/**
* @author Mark Paluch
Expand Down Expand Up @@ -49,28 +51,4 @@ void testConnectTimeout() {
}
}

// @Test
// void testConnectTimeout() {
//
// SocketOptions socketOptions = SocketOptions.builder().connectTimeout(100, TimeUnit.MILLISECONDS).build();
// client.setOptions(ClientOptions.builder().socketOptions(socketOptions).build());
//
// try {
// client.connect(RedisURI.create("2:4:5:5::1", 60000));
// fail("Missing RedisConnectionException");
// } catch (RedisConnectionException e) {
//
// if (e.getCause() instanceof ConnectTimeoutException) {
// assertThat(e).hasRootCauseInstanceOf(ConnectTimeoutException.class);
// assertThat(e.getCause()).hasMessageContaining("connection timed out");
// return;
// }
//
// if (e.getCause() instanceof SocketException) {
// // Network is unreachable or No route to host are OK as well.
// return;
// }
// }
// }

}

0 comments on commit 1e21d42

Please sign in to comment.