public void ZKHelperCreateTest() { var data = Guid.NewGuid().ToString(); ZkHelper.Create("/nscrapy/conf/1/dev", data); var returnedData = ZkHelper.GetAsync("/nscrapy/conf/1/dev").Result; Assert.AreEqual(data, returnedData); }
public void ZookeeperConfigProviderTest() { var config = new ZookeeperConfigProvider(); ZkHelper.Create("/nscrapy/conf", $"appsetting.{Guid.NewGuid().ToString()}.json"); ZkHelper.GetAsync("/nscrapy/conf"); ZkHelper.SetAsync("/nscrapy/conf", $"appsetting.{Guid.NewGuid().ToString()}.json"); ZkHelper.GetAsync("/nscrapy/conf"); ZkHelper.SetAsync("/nscrapy/conf", $"appsetting.{Guid.NewGuid().ToString()}.json"); Thread.Sleep(10000); }