You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aurora.apache.org by wf...@apache.org on 2015/10/27 00:02:59 UTC

aurora git commit: Add missing binding for ZooKeeperTestServer when running a local scheduler.

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 <wf...@apache.org>
Authored: Mon Oct 26 16:02:50 2015 -0700
Committer: Bill Farner <wf...@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(