RMap.replace race-condition fixed

pull/139/head
Nikita 10 years ago
parent 66d725582f
commit a4e21aff5f

@ -285,8 +285,8 @@ public class RedissonMap<K, V> extends RedissonExpirable implements RMap<K, V> {
} }
} else { } else {
connection.unwatch(); connection.unwatch();
return null;
} }
return null;
} }
} }
}); });

@ -84,7 +84,7 @@ public class RedissonConcurrentMapTest extends BaseConcurrentTest {
@Override @Override
public void run(Redisson redisson) { public void run(Redisson redisson) {
ConcurrentMap<Integer, Integer> map = redisson.getMap(name); ConcurrentMap<Integer, Integer> map = redisson.getMap(name);
map.replace(secureRandom.nextInt(5), 2); Assert.assertNotNull(map.replace(secureRandom.nextInt(5), 2));
} }
}); });

Loading…
Cancel
Save