コード例 #1
0
ファイル: BuildFailureEntity.cs プロジェクト: karelz/jenkins
        public BuildFailureEntity CopyExact()
        {
            var entity = new BuildFailureEntity(this);

            entity.SetEntityKey(GetExactEntityKey(BuildId, Identifier));
            return(entity);
        }
コード例 #2
0
ファイル: BuildFailureEntity.cs プロジェクト: karelz/jenkins
        public BuildFailureEntity CopyDate()
        {
            var entity = new BuildFailureEntity(this);

            entity.SetEntityKey(GetDateEntityKey(BuildDateTime, BuildId, Identifier));
            return(entity);
        }
コード例 #3
0
ファイル: BuildFailureEntity.cs プロジェクト: karelz/jenkins
 public BuildFailureEntity(BuildFailureEntity other) : this(
         buildId : other.BuildId,
         identifier : other.Identifier,
         buildDate : other.BuildDateTime,
         kind : other.BuildFailureKind,
         jobKind : other.JobKind,
         machineName : other.MachineName,
         prInfo : other.PullRequestInfo)
 {
 }
コード例 #4
0
ファイル: BuildTablePopulator.cs プロジェクト: karelz/jenkins
        private async Task PopulateUnitTestFailure(BuildInfo buildInfo, string jobKind, PullRequestInfo prInfo)
        {
            // TODO: Resolve this with CoreCLR.  They are producing way too many failures at the moment though
            // and we need to stop uploading 50,000 rows a day until we can resolve this.
            if (buildInfo.Id.JobName.Contains("dotnet_coreclr"))
            {
                return;
            }

            var buildId       = buildInfo.Id;
            var testCaseNames = _client.GetFailedTestCases(buildId);
            var entityList    = testCaseNames
                                .Select(x => BuildFailureEntity.CreateTestCaseFailure(buildInfo.Date, buildId, x, jobKind: jobKind, machineName: buildInfo.MachineName, prInfo: prInfo))
                                .ToList();

            EnsureTestCaseNamesUnique(entityList);
            await AzureUtil.InsertBatchUnordered(_buildFailureExactTable, entityList.Select(x => x.CopyExact()));

            await AzureUtil.InsertBatchUnordered(_buildFailureDateTable, entityList.Select(x => x.CopyDate()));
        }