Skip to content

Commit 99053cf

Browse files
committed
Polishing.
Fix build on Java 16. See #2071
1 parent f205d57 commit 99053cf

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

src/test/java/org/springframework/data/redis/core/DefaultStreamOperationsIntegrationTests.java

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,16 @@
3434
import org.springframework.data.redis.connection.jedis.extension.JedisConnectionFactoryExtension;
3535
import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory;
3636
import org.springframework.data.redis.connection.lettuce.extension.LettuceConnectionFactoryExtension;
37-
import org.springframework.data.redis.connection.stream.*;
37+
import org.springframework.data.redis.connection.stream.Consumer;
38+
import org.springframework.data.redis.connection.stream.MapRecord;
39+
import org.springframework.data.redis.connection.stream.ObjectRecord;
40+
import org.springframework.data.redis.connection.stream.PendingMessages;
41+
import org.springframework.data.redis.connection.stream.PendingMessagesSummary;
42+
import org.springframework.data.redis.connection.stream.ReadOffset;
43+
import org.springframework.data.redis.connection.stream.RecordId;
44+
import org.springframework.data.redis.connection.stream.StreamOffset;
45+
import org.springframework.data.redis.connection.stream.StreamReadOptions;
46+
import org.springframework.data.redis.connection.stream.StreamRecords;
3847
import org.springframework.data.redis.test.condition.EnabledOnCommand;
3948
import org.springframework.data.redis.test.condition.EnabledOnRedisDriver;
4049
import org.springframework.data.redis.test.condition.EnabledOnRedisVersion;
@@ -204,12 +213,12 @@ void exclusiveRangeShouldReportMessages() {
204213
List<MapRecord<K, HK, HV>> messages = streamOps.range(key,
205214
Range.from(Bound.exclusive(messageId1.getValue())).to(Bound.inclusive(messageId2.getValue())));
206215

207-
assertThat(messages).hasSize(1).extracting(Record::getId).contains(messageId2);
216+
assertThat(messages).hasSize(1).extracting(MapRecord::getId).contains(messageId2);
208217

209218
messages = streamOps.range(key,
210219
Range.from(Bound.inclusive(messageId1.getValue())).to(Bound.exclusive(messageId2.getValue())));
211220

212-
assertThat(messages).hasSize(1).extracting(Record::getId).contains(messageId1);
221+
assertThat(messages).hasSize(1).extracting(MapRecord::getId).contains(messageId1);
213222
}
214223

215224
@ParameterizedRedisTest // DATAREDIS-864
@@ -242,12 +251,12 @@ void exclusiveReverseRangeShouldReportMessages() {
242251
List<MapRecord<K, HK, HV>> messages = streamOps.reverseRange(key,
243252
Range.from(Bound.exclusive(messageId1.getValue())).to(Bound.inclusive(messageId3.getValue())));
244253

245-
assertThat(messages).hasSize(2).extracting(Record::getId).containsSequence(messageId3, messageId2);
254+
assertThat(messages).hasSize(2).extracting(MapRecord::getId).containsSequence(messageId3, messageId2);
246255

247256
messages = streamOps.reverseRange(key,
248257
Range.from(Bound.inclusive(messageId1.getValue())).to(Bound.exclusive(messageId3.getValue())));
249258

250-
assertThat(messages).hasSize(2).extracting(Record::getId).containsSequence(messageId2, messageId1);
259+
assertThat(messages).hasSize(2).extracting(MapRecord::getId).containsSequence(messageId2, messageId1);
251260
}
252261

253262
@ParameterizedRedisTest // DATAREDIS-864

0 commit comments

Comments
 (0)