当没有消费者倾听时,发布到虚拟主题的消息会发生什么?经纪人会持有一段时间,直到订户可用吗?
更具体地说:在T0和T1处,发布消息M0和M1.在T2,消费者C1连接,他会收到M0和M1吗?显然,在T3和T4发布的消息M2和M3将由C1接收,但是在T5连接的新消费者C2将接收什么?所有消息,M2和M3,还是没有?
我会假设以下测试应该通过,但是从不抛出异常.有线索吗?
@RunWith(PowerMockRunner.class)
@PrepareForTest(StaticService.class)
public class TestStuff {
@Test(expected = IllegalArgumentException.class)
public void testMockStatic() throws Exception {
mockStatic(StaticService.class);
doThrow(new IllegalArgumentException("Mockerror")).when(StaticService.say("hello"));
verifyStatic();
StaticService.say("hello");
}
Run Code Online (Sandbox Code Playgroud)
}
试图从AD中读到这个,和男孩一样,文档很乱.设置为15分钟后,我用Java阅读它:
Attributes attrs = ldapContext.getAttributes("DC=BPLAB01,DC=local");
System.out.println("Lockout policy for " + attrs.get("distinguishedName").get());
Long lockoutDuration = Long.parseLong(attrs.get("lockoutDuration").get().toString());
System.out.println("Duration: " + lockoutDuration);
Run Code Online (Sandbox Code Playgroud)
持续时间:-9000000000
将其设置为40分钟
持续时间:-24000000000
所以我的简单问题是,这里发生了什么,为什么这个大的负数?