mirror of
https://github.com/google/nomulus.git
synced 2025-07-20 17:56:08 +02:00
Fix mismatch in types of Predicates being used
We're going to need to switch away from Guava's Functions and Predicates for everything and replace them with the java.util versions. Unfortunately there does not appear to be an automated tool to do this all at once. Refaster got close but doesn't seem to care about these particular types of mismatch (I suspect we're using a different version of the JDK than the outside world; ours is OK with Guava classes). This also bumps up Guava to 0.23, which is needed for some new functionality used in combination with Java 8 features. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=170531539
This commit is contained in:
parent
447b83f7db
commit
a50ef39c04
9 changed files with 80 additions and 68 deletions
|
@ -18,6 +18,7 @@ import static com.google.common.base.Preconditions.checkArgument;
|
|||
import static com.google.common.base.Throwables.throwIfUnchecked;
|
||||
import static com.google.common.util.concurrent.Runnables.doNothing;
|
||||
import static google.registry.util.NetworkUtils.getCanonicalHostName;
|
||||
import static java.util.concurrent.Executors.newCachedThreadPool;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
|
@ -128,14 +129,18 @@ public final class TestServer {
|
|||
/** Stops the HTTP server. */
|
||||
public void stop() {
|
||||
try {
|
||||
new SimpleTimeLimiter().callWithTimeout(new Callable<Void>() {
|
||||
@Nullable
|
||||
@Override
|
||||
public Void call() throws Exception {
|
||||
server.stop();
|
||||
return null;
|
||||
}
|
||||
}, SHUTDOWN_TIMEOUT_MS, TimeUnit.MILLISECONDS, true);
|
||||
SimpleTimeLimiter.create(newCachedThreadPool())
|
||||
.callWithTimeout(
|
||||
new Callable<Void>() {
|
||||
@Nullable
|
||||
@Override
|
||||
public Void call() throws Exception {
|
||||
server.stop();
|
||||
return null;
|
||||
}
|
||||
},
|
||||
SHUTDOWN_TIMEOUT_MS,
|
||||
TimeUnit.MILLISECONDS);
|
||||
} catch (Exception e) {
|
||||
throwIfUnchecked(e);
|
||||
throw new RuntimeException(e);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue