Esempio n. 1
0
        public BuildFailureEntity CopyExact()
        {
            var entity = new BuildFailureEntity(this);

            entity.SetEntityKey(GetExactEntityKey(BuildId, Identifier));
            return(entity);
        }
Esempio n. 2
0
        public BuildFailureEntity CopyDate()
        {
            var entity = new BuildFailureEntity(this);

            entity.SetEntityKey(GetDateEntityKey(BuildDateTime, BuildId, Identifier));
            return(entity);
        }
Esempio n. 3
0
 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)
 {
 }
Esempio n. 4
0
        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()));
        }