Rename and update parallel testcase

This commit is contained in:
Joël Stemmer 2018-03-17 19:35:50 +00:00
parent 766f2ff9bb
commit 6f96942bb2
3 changed files with 18 additions and 9 deletions

View File

@ -766,12 +766,12 @@ var testCases = []TestCase{
}, },
}, },
{ {
name: "20-trio.txt", name: "20-parallel.txt",
reportName: "20-report.xml", reportName: "20-report.xml",
report: &parser.Report{ report: &parser.Report{
Packages: []parser.Package{ Packages: []parser.Package{
{ {
Name: "", Name: "pkg/parallel",
Time: 3010, Time: 3010,
Tests: []*parser.Test{ Tests: []*parser.Test{
{ {
@ -781,6 +781,7 @@ var testCases = []TestCase{
Output: []string{ Output: []string{
"Message from first", "Message from first",
"Supplemental from first", "Supplemental from first",
"parallel_test.go:14: FirstTest error",
}, },
}, },
{ {
@ -789,6 +790,7 @@ var testCases = []TestCase{
Result: parser.FAIL, Result: parser.FAIL,
Output: []string{ Output: []string{
"Message from second", "Message from second",
"parallel_test.go:23: SecondTest error",
}, },
}, },
{ {
@ -797,6 +799,7 @@ var testCases = []TestCase{
Result: parser.FAIL, Result: parser.FAIL,
Output: []string{ Output: []string{
"Message from third", "Message from third",
"parallel_test.go:32: ThirdTest error",
}, },
}, },
}, },

View File

@ -9,5 +9,11 @@ Supplemental from first
=== RUN ThirdTest === RUN ThirdTest
Message from third Message from third
--- FAIL: ThirdTest (0.01s) --- FAIL: ThirdTest (0.01s)
parallel_test.go:32: ThirdTest error
--- FAIL: FirstTest (2.00s) --- FAIL: FirstTest (2.00s)
parallel_test.go:14: FirstTest error
--- FAIL: SecondTest (1.00s) --- FAIL: SecondTest (1.00s)
parallel_test.go:23: SecondTest error
FAIL
exit status 1
FAIL pkg/parallel 3.010s

View File

@ -1,17 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<testsuites> <testsuites>
<testsuite tests="3" failures="3" time="3.010" name=""> <testsuite tests="3" failures="3" time="3.010" name="pkg/parallel">
<properties> <properties>
<property name="go.version" value="1.0"></property> <property name="go.version" value="1.0"></property>
</properties> </properties>
<testcase classname="" name="FirstTest" time="2.000"> <testcase classname="parallel" name="FirstTest" time="2.000">
<failure message="Failed" type="">Message from first&#xA;Supplemental from first</failure> <failure message="Failed" type="">Message from first&#xA;Supplemental from first&#xA;parallel_test.go:14: FirstTest error</failure>
</testcase> </testcase>
<testcase classname="" name="SecondTest" time="1.000"> <testcase classname="parallel" name="SecondTest" time="1.000">
<failure message="Failed" type="">Message from second</failure> <failure message="Failed" type="">Message from second&#xA;parallel_test.go:23: SecondTest error</failure>
</testcase> </testcase>
<testcase classname="" name="ThirdTest" time="0.010"> <testcase classname="parallel" name="ThirdTest" time="0.010">
<failure message="Failed" type="">Message from third</failure> <failure message="Failed" type="">Message from third&#xA;parallel_test.go:32: ThirdTest error</failure>
</testcase> </testcase>
</testsuite> </testsuite>
</testsuites> </testsuites>