This commit is contained in:
jmacxx 2020-12-03 14:01:54 -06:00
parent 8bd03d2689
commit 192a905231
No known key found for this signature in database
GPG key ID: 155297BABFE94A1B
3 changed files with 15 additions and 5 deletions

View file

@ -55,7 +55,9 @@ public abstract class PriceProvider<T> implements SmartLifecycle, Supplier<T> {
public final void start() {
// do the initial refresh asynchronously
UserThread.runAfter(() -> {
try { refresh(); } catch (Throwable t) {
try {
refresh();
} catch (Throwable t) {
log.warn("initial refresh failed", t);
}
}, 1, TimeUnit.MILLISECONDS);

View file

@ -67,7 +67,9 @@ public class MempoolFeeRateProviderTest {
// Initialize provider
dummyProvider.start();
try { sleep(1000); } catch (InterruptedException e) { }
try {
sleep(1000);
} catch (InterruptedException e) { }
dummyProvider.stop();
return dummyProvider;
@ -88,7 +90,9 @@ public class MempoolFeeRateProviderTest {
// Initialize provider
dummyProvider.start();
try { sleep(1000); } catch (InterruptedException e) { }
try {
sleep(1000);
} catch (InterruptedException e) { }
dummyProvider.stop();
return dummyProvider;

View file

@ -288,7 +288,9 @@ public class ExchangeRateServiceTest {
// Initialize provider
dummyProvider.start();
try { sleep(1000); } catch (InterruptedException e) { }
try {
sleep(1000);
} catch (InterruptedException e) { }
dummyProvider.stop();
return dummyProvider;
@ -324,7 +326,9 @@ public class ExchangeRateServiceTest {
// Initialize provider
dummyProvider.start();
try { sleep(1000); } catch (InterruptedException e) { }
try {
sleep(1000);
} catch (InterruptedException e) { }
dummyProvider.stop();
return dummyProvider;