예제 #1
0
        public void TestInitialize()
        {
            if (!TestContext.TestName.Contains("TestHost"))
            {
                this.client = TestHelpers.CreateTaskHubClient();

                this.taskHub     = TestHelpers.CreateTaskHub();
                this.fakeTaskHub = TestHelpers.CreateTaskHub();

                this.taskHubNoCompression     = TestHelpers.CreateTaskHubNoCompression();
                this.taskHubLegacyCompression = TestHelpers.CreateTaskHubLegacyCompression();
                this.taskHubAlwaysCompression = TestHelpers.CreateTaskHubAlwaysCompression();
                this.clientNoCompression      = TestHelpers.CreateTaskHubClientNoCompression();

                this.taskHub.orchestrationService.CreateAsync(true).Wait();
            }
        }
예제 #2
0
        public async Task TestOrchestrationCount()
        {
            taskHub = TestHelpers.CreateTaskHub();
            client  = TestHelpers.CreateTaskHubClient();
            var service = taskHub.orchestrationService as ServiceBusOrchestrationService;

            Assert.IsNotNull(service);
            await service.CreateAsync();

            await client.CreateOrchestrationInstanceAsync("foo", "1.0", null);

            await client.CreateOrchestrationInstanceAsync("foo1", "1.0", null);

            await client.CreateOrchestrationInstanceAsync("foo2", "1.0", null);

            Assert.IsTrue(service.GetPendingOrchestrationsCount() == 3);
            await service.DeleteAsync();
        }