mirror of https://github.com/tikv/client-java.git
fix fmt
Signed-off-by: Daemonxiao <735462752@qq.com> Co-authored-by: iosmanthus <myosmanthustree@gmail.com>
This commit is contained in:
parent
8849f35d29
commit
7742a6d377
|
|
@ -55,7 +55,8 @@ public class ChannelFactoryTest {
|
|||
File a = new File(caPath);
|
||||
File b = new File(clientCertPath);
|
||||
File c = new File(clientKeyPath);
|
||||
try(CertWatcher certWatcher = new CertWatcher(2, ImmutableList.of(a, b, c), () -> changed.set(true))){
|
||||
try (CertWatcher certWatcher =
|
||||
new CertWatcher(2, ImmutableList.of(a, b, c), () -> changed.set(true))) {
|
||||
Thread.sleep(5000);
|
||||
assertTrue(changed.get());
|
||||
}
|
||||
|
|
@ -64,14 +65,15 @@ public class ChannelFactoryTest {
|
|||
@Test
|
||||
public void testCertWatcherWithExceptionTask() throws InterruptedException {
|
||||
AtomicInteger timesOfReloadTask = new AtomicInteger(0);
|
||||
CertWatcher certWatcher = new CertWatcher(
|
||||
1,
|
||||
ImmutableList.of(new File(caPath), new File(clientCertPath), new File(clientKeyPath)),
|
||||
() -> {
|
||||
timesOfReloadTask.getAndIncrement();
|
||||
touchCert();
|
||||
throw new RuntimeException("Mock exception in reload task");
|
||||
});
|
||||
CertWatcher certWatcher =
|
||||
new CertWatcher(
|
||||
1,
|
||||
ImmutableList.of(new File(caPath), new File(clientCertPath), new File(clientKeyPath)),
|
||||
() -> {
|
||||
timesOfReloadTask.getAndIncrement();
|
||||
touchCert();
|
||||
throw new RuntimeException("Mock exception in reload task");
|
||||
});
|
||||
|
||||
Thread.sleep(5000);
|
||||
certWatcher.close();
|
||||
|
|
|
|||
Loading…
Reference in New Issue