Esempio n. 1
0
        private void SandboxOnCompletedEvent(object sender, CompileSingleTestSandboxCompletionEventArgs args)
        {
            // If the sandbox has been removed and thus completed, then lets go and handle the completion
            // for this selected test, process onto the following test or completing overall.
            var sandbox = (SingleTestSandbox)this._compilerService.GetSandboxByContainerId(args.ContainerId);

            this.HandleSandboxCompletion(sandbox, args.Response)
            .FireAndForgetSafeAsync(this.HandleSandboxCompletionFailedExecution);
        }
Esempio n. 2
0
        private void OnSingleTestCompileSandboxCompletionEvent(object sender,
                                                               CompileSingleTestSandboxCompletionEventArgs args)
        {
            var sandbox = (SingleTestSandbox)sender;

            this.RemoveSandbox(sandbox);

            sandbox.StatusChangeEvent -= this.OnStatusChangeEvent;
            sandbox.CompletedEvent    -= this.OnSingleTestCompileSandboxCompletionEvent;

            var response = new CompileTestSourceResponse(args.Id, args.Response.Result,
                                                         args.Response.Status, args.Response.TestCaseResult);

            this._logger.LogInformation($"single test: {JsonConvert.SerializeObject(response)}");
            this._publisher.PublishSingleTestCompileSourceResponse(response)
            .FireAndForgetSafeAsync(this.HandleSandboxCompleteFailedException);
        }