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); }
public void ZKHeperCreateConfigTest() { var data = File.ReadAllText("appsetting.json"); ZkHelper.SetAsync("/nscrapy/conf", data); }