public virtual void TestZKRetryInterval()
        {
            TestZKRMStateStoreZKClientConnections.TestZKClient zkClientTester = new TestZKRMStateStoreZKClientConnections.TestZKClient
                                                                                    (this);
            YarnConfiguration conf  = new YarnConfiguration();
            ZKRMStateStore    store = (ZKRMStateStore)zkClientTester.GetRMStateStore(conf);

            NUnit.Framework.Assert.AreEqual(YarnConfiguration.DefaultRmZkRetryIntervalMs, store
                                            .zkRetryInterval);
            store.Stop();
            conf.SetBoolean(YarnConfiguration.RmHaEnabled, true);
            store = (ZKRMStateStore)zkClientTester.GetRMStateStore(conf);
            NUnit.Framework.Assert.AreEqual(YarnConfiguration.DefaultRmZkTimeoutMs / YarnConfiguration
                                            .DefaultZkRmNumRetries, store.zkRetryInterval);
            store.Stop();
        }
Esempio n. 2
0
 public override void TearDown()
 {
     if (store != null)
     {
         store.Stop();
     }
     if (appTokenMgr != null)
     {
         appTokenMgr.Stop();
     }
     base.TearDown();
 }