File tree 1 file changed +18
-0
lines changed
src/test/java/org/springframework/data/redis/cache
1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -224,12 +224,30 @@ void evictShouldRemoveKey() {
224
224
225
225
doWithConnection (connection -> {
226
226
connection .set (binaryCacheKey , binaryNullValue );
227
+ connection .set ("other" .getBytes (), "value" .getBytes ());
227
228
});
228
229
229
230
cache .evict (key );
230
231
231
232
doWithConnection (connection -> {
232
233
assertThat (connection .exists (binaryCacheKey )).isFalse ();
234
+ assertThat (connection .exists ("other" .getBytes ())).isTrue ();
235
+ });
236
+ }
237
+
238
+ @ ParameterizedRedisTest // GH-2028
239
+ void clearShouldClearCache () {
240
+
241
+ doWithConnection (connection -> {
242
+ connection .set (binaryCacheKey , binaryNullValue );
243
+ connection .set ("other" .getBytes (), "value" .getBytes ());
244
+ });
245
+
246
+ cache .clear ();
247
+
248
+ doWithConnection (connection -> {
249
+ assertThat (connection .exists (binaryCacheKey )).isFalse ();
250
+ assertThat (connection .exists ("other" .getBytes ())).isTrue ();
233
251
});
234
252
}
235
253
You can’t perform that action at this time.
0 commit comments