Skip to content

Commit

Permalink
asim: remove extra new line in PrintSpanConfigConformanceList
Browse files Browse the repository at this point in the history
Previously, PrintSpanConfigConformanceList included an extra line at the end.
Following the asim output convention, most output functions defer the decision
to include this extra line to caller  (top level) rather than the callee
functions. This patch removes the extra line in PrintSpanConfigConformanceList.

Epic: None

Release Note: None
  • Loading branch information
wenyihu6 committed Sep 25, 2023
1 parent 12d5378 commit 263dff6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion pkg/kv/kvserver/asim/assertion/assert.go
Original file line number Diff line number Diff line change
Expand Up @@ -405,8 +405,11 @@ func PrintSpanConfigConformanceList(tag string, ranges []roachpb.ConformanceRepo
if i == 0 {
buf.WriteString(fmt.Sprintf("%s:\n", tag))
}
buf.WriteString(fmt.Sprintf(" %s applying %s\n", printRangeDesc(r.RangeDescriptor),
buf.WriteString(fmt.Sprintf(" %s applying %s", printRangeDesc(r.RangeDescriptor),
spanconfigtestutils.PrintSpanConfigDiffedAgainstDefaults(r.Config)))
if i != len(ranges)-1 {
buf.WriteString("\n")
}
}
return buf.String()
}
2 changes: 1 addition & 1 deletion pkg/kv/kvserver/asim/tests/output.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ func (tr testResultsReport) String() string {
buf.WriteString(output.eventExecutor.PrintEventsExecuted())
}
if failed {
buf.WriteString(fmt.Sprintf("sample%d: failed assertion\n%s", nthSample, output.reason))
buf.WriteString(fmt.Sprintf("sample%d: failed assertion\n%s\n", nthSample, output.reason))
} else {
buf.WriteString(fmt.Sprintf("sample%d: pass\n", nthSample))
}
Expand Down

0 comments on commit 263dff6

Please sign in to comment.