File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
src/test/java/org/springframework/data/redis/cache Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -224,12 +224,30 @@ void evictShouldRemoveKey() {
224224
225225 doWithConnection (connection -> {
226226 connection .set (binaryCacheKey , binaryNullValue );
227+ connection .set ("other" .getBytes (), "value" .getBytes ());
227228 });
228229
229230 cache .evict (key );
230231
231232 doWithConnection (connection -> {
232233 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 ();
233251 });
234252 }
235253
You can’t perform that action at this time.
0 commit comments