DATAREDIS-576 - Polishing.
Update Javadoc, apply missing @Nullable annotations, add tests and alter makefile to use Redis 4.0.2. Original Pull Request: #285
This commit is contained in:
@@ -73,4 +73,14 @@ public class LettuceClientConfigurationUnitTests {
|
||||
assertThat(configuration.getCommandTimeout()).isEqualTo(Duration.ofMinutes(5));
|
||||
assertThat(configuration.getShutdownTimeout()).isEqualTo(Duration.ofHours(2));
|
||||
}
|
||||
|
||||
@Test(expected = IllegalArgumentException.class) // DATAREDIS-576
|
||||
public void clientConfigurationThrowsExceptionForNullClientName() {
|
||||
LettuceClientConfiguration.builder().clientName(null);
|
||||
}
|
||||
|
||||
@Test(expected = IllegalArgumentException.class) // DATAREDIS-576
|
||||
public void clientConfigurationThrowsExceptionForEmptyClientName() {
|
||||
LettuceClientConfiguration.builder().clientName(" ");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -372,12 +372,12 @@ public class LettuceConnectionFactoryTests {
|
||||
factory.setShareNativeConnection(false);
|
||||
factory.afterPropertiesSet();
|
||||
|
||||
ConnectionFactoryTracker.add(factory);
|
||||
|
||||
RedisConnection connection = factory.getConnection();
|
||||
|
||||
assertThat(connection.getClientName(), is(equalTo("clientName")));
|
||||
connection.close();
|
||||
|
||||
factory.destroy();
|
||||
}
|
||||
|
||||
@Test // DATAREDIS-576
|
||||
@@ -388,11 +388,11 @@ public class LettuceConnectionFactoryTests {
|
||||
factory.setClientName("clientName");
|
||||
factory.afterPropertiesSet();
|
||||
|
||||
ConnectionFactoryTracker.add(factory);
|
||||
|
||||
RedisConnection connection = factory.getConnection();
|
||||
assertThat(connection.getClientName(), equalTo("clientName"));
|
||||
|
||||
connection.close();
|
||||
|
||||
factory.destroy();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user