Skip to content

Commit

Permalink
Remove extra filed parentName
Browse files Browse the repository at this point in the history
  • Loading branch information
platan committed Oct 16, 2023
1 parent b454bf9 commit 701ae04
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,10 @@ abstract class TestExecutionResultsRegisterService : BuildService<BuildServicePa
startTime: Long,
endTime: Long,
resultType: String,
type: TimedTestResult.Type,
parentName: String?
type: TimedTestResult.Type
) {
val taskResults = results.getOrPut(task) { TestExecutionScheduleReportBuilder() }
taskResults.add(className, testName, startTime, endTime, resultType, type, parentName)
taskResults.add(className, testName, startTime, endTime, resultType, type)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ class TestExecutionScheduleTestListener(
result.startTime,
result.endTime,
result.resultType.toString(),
TimedTestResult.Type.SUITE,
suite.parent?.name
TimedTestResult.Type.SUITE
)
}
}
Expand All @@ -44,8 +43,7 @@ class TestExecutionScheduleTestListener(
testResult.startTime,
testResult.endTime,
testResult.resultType.toString(),
TimedTestResult.Type.TEST,
testDescriptor.parent?.name
TimedTestResult.Type.TEST
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ class TestExecutionScheduleReportBuilder {
startTime: Long,
endTime: Long,
resultType: String,
type: TimedTestResult.Type,
parentName: String?
type: TimedTestResult.Type
) {
results.add(TimedTestResult(className, testName, startTime, endTime, resultType, type))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ class TestExecutionMermaidDiagramFormatterSpec extends Specification {
def getDefault = TimeZone.getDefault()
TimeZone.setDefault(SimpleTimeZone.getTimeZone(ZoneOffset.ofHours(2)))
def reportBuilder = new TestExecutionScheduleReportBuilder()
reportBuilder.add('Test1', 'test1', 1681402397000, 1681402397100, 'SUCCESS', TEST, 'parent name')
reportBuilder.add('Test1', 'test2', 1681402397100, 1681402397300, 'SUCCESS', TEST, 'parent name')
reportBuilder.add('Test1', 'suite', 1681402397000, 1681402397300, 'SUCCESS', SUITE, 'parent name')
reportBuilder.add('Test2', 'test1', 1681402397000, 1681402397100, 'FAILURE', TEST, 'parent name')
reportBuilder.add('Test2', 'suite', 1681402397000, 1681402397300, 'FAILURE', SUITE, 'parent name')
reportBuilder.add('Test3', 'test1', 1681402397100, 1681402397300, 'SKIPPED', TEST, 'parent name')
reportBuilder.add('Test3', 'suite', 1681402397000, 1681402397300, 'SKIPPED', SUITE, 'parent name')
reportBuilder.add('Test1', 'test1', 1681402397000, 1681402397100, 'SUCCESS', TEST)
reportBuilder.add('Test1', 'test2', 1681402397100, 1681402397300, 'SUCCESS', TEST)
reportBuilder.add('Test1', 'suite', 1681402397000, 1681402397300, 'SUCCESS', SUITE)
reportBuilder.add('Test2', 'test1', 1681402397000, 1681402397100, 'FAILURE', TEST)
reportBuilder.add('Test2', 'suite', 1681402397000, 1681402397300, 'FAILURE', SUITE)
reportBuilder.add('Test3', 'test1', 1681402397100, 1681402397300, 'SKIPPED', TEST)
reportBuilder.add('Test3', 'suite', 1681402397000, 1681402397300, 'SKIPPED', SUITE)
def report = reportBuilder.getResults()

when:
Expand Down Expand Up @@ -55,9 +55,9 @@ suite - 300 ms :2023-04-13T18:13:17.000+0200, 2023-04-13T18:13:17.300+0200
def getDefault = TimeZone.getDefault()
TimeZone.setDefault(SimpleTimeZone.getTimeZone(ZoneOffset.ofHours(2)))
def reportBuilder = new TestExecutionScheduleReportBuilder()
reportBuilder.add('Test1', 'test1', 1681402397000, 1681402397100, 'SUCCESS', TEST, 'parent name')
reportBuilder.add('Test1', 'test2', 1681402397100, 1681402397300, 'SUCCESS', TEST, 'parent name')
reportBuilder.add('Test2', 'test1', 1681402397000, 1681402397100, 'SUCCESS', TEST, 'parent name')
reportBuilder.add('Test1', 'test1', 1681402397000, 1681402397100, 'SUCCESS', TEST)
reportBuilder.add('Test1', 'test2', 1681402397100, 1681402397300, 'SUCCESS', TEST)
reportBuilder.add('Test2', 'test1', 1681402397000, 1681402397100, 'SUCCESS', TEST)
def results = reportBuilder.getResults()
def report = results.copy(results.results, [new Mark('mark1', 1681402397400)])

Expand Down

0 comments on commit 701ae04

Please sign in to comment.