force result for Srp#exec when not in pipeline

This commit is contained in:
Costin Leau
2012-06-22 10:28:32 +03:00
parent 8828d3912f
commit 5d8206f366
2 changed files with 12 additions and 4 deletions

View File

@@ -17,12 +17,14 @@
package org.springframework.data.redis.cache;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame;
import org.junit.Before;
import org.junit.Test;
import org.springframework.cache.Cache;
import org.springframework.cache.Cache.ValueWrapper;
/**
* Test for native cache implementations.
@@ -64,9 +66,12 @@ public abstract class AbstractNativeCacheTest<T> {
Object key = getObject();
Object value = getObject();
assertNotNull(value);
assertNull(cache.get(key));
cache.put(key, value);
assertEquals(value, cache.get(key).get());
ValueWrapper valueWrapper = cache.get(key);
assertNotNull(valueWrapper);
assertEquals(value, valueWrapper.get());
}
@Test