aurora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wfar...@apache.org
Subject aurora git commit: Add missing binding for ZooKeeperTestServer when running a local scheduler.
Date Mon, 26 Oct 2015 23:02:59 GMT
Repository: aurora
Updated Branches:
  refs/heads/master e6f940b24 -> c20346c18


Add missing binding for ZooKeeperTestServer when running a local scheduler.

Reviewed at https://reviews.apache.org/r/39669/


Project: http://git-wip-us.apache.org/repos/asf/aurora/repo
Commit: http://git-wip-us.apache.org/repos/asf/aurora/commit/c20346c1
Tree: http://git-wip-us.apache.org/repos/asf/aurora/tree/c20346c1
Diff: http://git-wip-us.apache.org/repos/asf/aurora/diff/c20346c1

Branch: refs/heads/master
Commit: c20346c18bf6ca6f119b28008110af919512b2c2
Parents: e6f940b
Author: Bill Farner <wfarner@apache.org>
Authored: Mon Oct 26 16:02:50 2015 -0700
Committer: Bill Farner <wfarner@apache.org>
Committed: Mon Oct 26 16:02:50 2015 -0700

----------------------------------------------------------------------
 config/legacy_untested_classes.txt                    |  1 -
 .../zookeeper/guice/client/ZooKeeperClientModule.java | 14 +++++++++++++-
 2 files changed, 13 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/aurora/blob/c20346c1/config/legacy_untested_classes.txt
----------------------------------------------------------------------
diff --git a/config/legacy_untested_classes.txt b/config/legacy_untested_classes.txt
index 70d1dd0..b77265c 100644
--- a/config/legacy_untested_classes.txt
+++ b/config/legacy_untested_classes.txt
@@ -1,4 +1,3 @@
-org/apache/aurora/GuavaUtils$LifecycleShutdownListener
 org/apache/aurora/Protobufs$1
 org/apache/aurora/auth/CapabilityValidator$AuditCheck
 org/apache/aurora/auth/UnsecureAuthModule$UnsecureCapabilityValidator

http://git-wip-us.apache.org/repos/asf/aurora/blob/c20346c1/src/main/java/org/apache/aurora/scheduler/zookeeper/guice/client/ZooKeeperClientModule.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/zookeeper/guice/client/ZooKeeperClientModule.java
b/src/main/java/org/apache/aurora/scheduler/zookeeper/guice/client/ZooKeeperClientModule.java
index 273883f..bf2111d 100644
--- a/src/main/java/org/apache/aurora/scheduler/zookeeper/guice/client/ZooKeeperClientModule.java
+++ b/src/main/java/org/apache/aurora/scheduler/zookeeper/guice/client/ZooKeeperClientModule.java
@@ -13,11 +13,13 @@
  */
 package org.apache.aurora.scheduler.zookeeper.guice.client;
 
+import java.io.File;
 import java.io.IOException;
 import java.net.InetSocketAddress;
 
 import com.google.common.base.Optional;
 import com.google.common.base.Throwables;
+import com.google.common.io.Files;
 import com.google.common.util.concurrent.AbstractIdleService;
 import com.google.inject.AbstractModule;
 import com.google.inject.Inject;
@@ -70,6 +72,17 @@ public class ZooKeeperClientModule extends AbstractModule {
   protected void configure() {
     Key<ZooKeeperClient> clientKey = keyFactory.create(ZooKeeperClient.class);
     if (config.inProcess) {
+      File tempDir = Files.createTempDir();
+      try {
+        bind(ZooKeeperTestServer.class).toInstance(
+            new ZooKeeperTestServer(
+                ZooKeeperTestServer.DEFAULT_SESSION_TIMEOUT,
+                tempDir,
+                tempDir));
+      } catch (IOException e) {
+        throw Throwables.propagate(e);
+      }
+
       install(new PrivateModule() {
         @Override
         protected void configure() {
@@ -80,7 +93,6 @@ public class ZooKeeperClientModule extends AbstractModule {
           expose(clientKey);
         }
       });
-      bind(ZooKeeperTestServer.class).in(Singleton.class);
       SchedulerServicesModule.addAppStartupServiceBinding(binder()).to(TestServerService.class);
     } else {
       bind(clientKey).toInstance(new ZooKeeperClient(


Mime
View raw message