use of cn.taketoday.retry.context.RetryContextSupport in project today-infrastructure by TAKETODAY.
the class MapRetryContextCacheTests method testPut.
@Test
public void testPut() {
RetryContextSupport context = new RetryContextSupport(null);
cache.put("foo", context);
assertEquals(context, cache.get("foo"));
}
use of cn.taketoday.retry.context.RetryContextSupport in project today-infrastructure by TAKETODAY.
the class MapRetryContextCacheTests method testRemove.
@Test
public void testRemove() {
assertFalse(cache.containsKey("foo"));
RetryContextSupport context = new RetryContextSupport(null);
cache.put("foo", context);
assertTrue(cache.containsKey("foo"));
cache.remove("foo");
assertFalse(cache.containsKey("foo"));
}
use of cn.taketoday.retry.context.RetryContextSupport in project today-infrastructure by TAKETODAY.
the class RetrySynchronizationManagerTests method testStatusRegistration.
@Test
public void testStatusRegistration() throws Exception {
RetryContext status = new RetryContextSupport(null);
RetryContext value = RetrySynchronizationManager.register(status);
assertNull(value);
value = RetrySynchronizationManager.register(status);
assertEquals(status, value);
}
use of cn.taketoday.retry.context.RetryContextSupport in project today-infrastructure by TAKETODAY.
the class RetrySynchronizationManagerTests method testClear.
@Test
public void testClear() throws Exception {
RetryContext status = new RetryContextSupport(null);
RetryContext value = RetrySynchronizationManager.register(status);
assertNull(value);
RetrySynchronizationManager.clear();
value = RetrySynchronizationManager.register(status);
assertNull(value);
}
use of cn.taketoday.retry.context.RetryContextSupport in project today-infrastructure by TAKETODAY.
the class RetrySynchronizationManagerTests method testParent.
@Test
public void testParent() throws Exception {
RetryContext parent = new RetryContextSupport(null);
RetryContext child = new RetryContextSupport(parent);
assertSame(parent, child.getParent());
}
Aggregations