Skip to content

Commit f28136b

Browse files
committed
Skip performance test in short mode
When packaging this library for Debian, some CI servers are slow to run performance tests.
1 parent 6d67075 commit f28136b

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

extra_test.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ func nowMillis() int64 {
9494
}
9595

9696
func TestDeepNestedLabelPerformance(t *testing.T) {
97+
if testing.Short() {
98+
t.Skip("skipping performance test in short mode")
99+
}
97100
markdown := New(WithRendererOptions(
98101
html.WithXHTML(),
99102
html.WithUnsafe(),
@@ -111,6 +114,9 @@ func TestDeepNestedLabelPerformance(t *testing.T) {
111114
}
112115

113116
func TestManyProcessingInstructionPerformance(t *testing.T) {
117+
if testing.Short() {
118+
t.Skip("skipping performance test in short mode")
119+
}
114120
markdown := New(WithRendererOptions(
115121
html.WithXHTML(),
116122
html.WithUnsafe(),
@@ -128,6 +134,9 @@ func TestManyProcessingInstructionPerformance(t *testing.T) {
128134
}
129135

130136
func TestManyCDATAPerformance(t *testing.T) {
137+
if testing.Short() {
138+
t.Skip("skipping performance test in short mode")
139+
}
131140
markdown := New(WithRendererOptions(
132141
html.WithXHTML(),
133142
html.WithUnsafe(),
@@ -145,6 +154,9 @@ func TestManyCDATAPerformance(t *testing.T) {
145154
}
146155

147156
func TestManyDeclPerformance(t *testing.T) {
157+
if testing.Short() {
158+
t.Skip("skipping performance test in short mode")
159+
}
148160
markdown := New(WithRendererOptions(
149161
html.WithXHTML(),
150162
html.WithUnsafe(),
@@ -162,6 +174,9 @@ func TestManyDeclPerformance(t *testing.T) {
162174
}
163175

164176
func TestManyCommentPerformance(t *testing.T) {
177+
if testing.Short() {
178+
t.Skip("skipping performance test in short mode")
179+
}
165180
markdown := New(WithRendererOptions(
166181
html.WithXHTML(),
167182
html.WithUnsafe(),

0 commit comments

Comments
 (0)