public void HealthCheck_NotHealthy_ShouldReturn500() { tester.GetGrainClient <IProgrammableHealthGrain>(0).SetHealth(false); var httpResponseMessage = new HttpClient().GetAsync(new Uri($"http://{CurrentApplicationInfo.HostName}:6555/{nameof(IProgrammableHealth).Substring(1)}.status")).Result; httpResponseMessage.StatusCode.ShouldBe(HttpStatusCode.InternalServerError); }
public async Task InstanceReadyBeforeCallingMethod_Warmup() { ServiceTester <CalculatorServiceHost> tester = AssemblyInitialize.ResolutionRoot.GetServiceTester <CalculatorServiceHost>(mainPort); IWarmupTestServiceGrain grain = tester.GetGrainClient <IWarmupTestServiceGrain>(0); int result = await grain.TestWarmedTimes(); result = await grain.TestWarmedTimes(); result = await grain.TestWarmedTimes(); Assert.AreEqual(result, 1); tester.Dispose(); }