Exemplo n.º 1
0
        public async Task TestQueryRuns()
        {
            TriggerClient    triggerClient = CreateTriggerClient();
            TriggerRunClient runClient     = CreateRunClient();

            TriggerResource resource = await DisposableTrigger.CreateResource(triggerClient, Recording);

            TriggerStartTriggerOperation startOperation = await triggerClient.StartStartTriggerAsync(resource.Name);

            await startOperation.WaitAndAssertSuccessfulCompletion();

            TriggerRunsQueryResponse response = await runClient.QueryTriggerRunsByWorkspaceAsync(new RunFilterParameters (DateTimeOffset.MinValue, DateTimeOffset.MaxValue));

            Assert.GreaterOrEqual(response.Value.Count, 1);
        }
Exemplo n.º 2
0
        public async Task TestCancelRerun()
        {
            TriggerClient    triggerClient = CreateTriggerClient();
            TriggerRunClient runClient     = CreateRunClient();

            TriggerResource resource = await DisposableTrigger.CreateResource(triggerClient, Recording);

            TriggerStartTriggerOperation startOperation = await triggerClient.StartStartTriggerAsync(resource.Name);

            await startOperation.WaitAndAssertSuccessfulCompletion();

            TriggerRunsQueryResponse response = await runClient.QueryTriggerRunsByWorkspaceAsync(new RunFilterParameters (DateTimeOffset.MinValue, DateTimeOffset.MaxValue));

            // Find the active run and cancel (CancelTriggerInstanceAsync)

            // Rerun canceled run (RerunTriggerInstanceAsync)
        }
Exemplo n.º 3
0
        public async Task TestStartStop()
        {
            TriggerClient  client         = CreateClient();
            PipelineClient pipelineClient = CreatePipelineClient();

            await using DisposableTrigger trigger = await DisposableTrigger.Create(client, Recording);

            await using DisposablePipeline pipeline = await DisposablePipeline.Create(pipelineClient, Recording);

            // SYNAPSE_API_ISSUE - How do we point the trigger to our pipeline

            TriggerStartTriggerOperation startOperation = await client.StartStartTriggerAsync(trigger.Name);

            Response startResponse = await startOperation.WaitForCompletionResponseAsync();

            startResponse.AssertSuccess();

            TriggerStopTriggerOperation stopOperation = await client.StartStopTriggerAsync(trigger.Name);

            Response stopResponse = await stopOperation.WaitForCompletionResponseAsync();

            stopResponse.AssertSuccess();
        }