Skip to content

Commit

Permalink
Get rid of math.Round()
Browse files Browse the repository at this point in the history
Signed-off-by: Artyom Lukianov <alukiano@redhat.com>
  • Loading branch information
Artyom Lukianov committed Jun 18, 2018
1 parent 11135bf commit 7fdb46e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions reporters/junit_reporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ package reporters
import (
"encoding/xml"
"fmt"
"math"
"strconv"
"os"
"strings"

Expand Down Expand Up @@ -121,7 +121,7 @@ func (reporter *JUnitReporter) SpecDidComplete(specSummary *types.SpecSummary) {

func (reporter *JUnitReporter) SpecSuiteDidEnd(summary *types.SuiteSummary) {
reporter.suite.Tests = summary.NumberOfSpecsThatWillBeRun
reporter.suite.Time = math.Round(summary.RunTime.Seconds() * 1000 / 1000)
reporter.suite.Time, _ = strconv.ParseFloat(fmt.Sprintf("%.3f", summary.RunTime.Seconds()), 3)
reporter.suite.Failures = summary.NumberOfFailedSpecs
reporter.suite.Errors = 0
file, err := os.Create(reporter.filename)
Expand Down

0 comments on commit 7fdb46e

Please sign in to comment.