Skip to content

Commit b9ddaf8

Browse files
committed
kv: skip some slow tests when -short
1 parent 056907f commit b9ddaf8

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

kv/cmd/kvschema/main_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ type ImplementerReport struct {
6767
}
6868

6969
func TestStuff(t *testing.T) {
70+
if testing.Short() {
71+
t.Skip("skipping slow test in -short mode")
72+
}
7073
for _, test := range tests {
7174
fset := token.NewFileSet()
7275
f, err := parser.ParseFile(fset, "input.go", test.Source, 0)

kv/examples/docs/docs_test.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,9 @@ func verifyDocuments(s *Txn, des []kv.Entity, ds []Document) {
102102
}
103103

104104
func TestCreateRead(t *testing.T) {
105+
if testing.Short() {
106+
t.Skip("skipping slow test in -short mode")
107+
}
105108
test := func(s_ kv.Txn) {
106109
s := New(s_)
107110
samples := sampleDocuments("Test", 5)
@@ -112,6 +115,9 @@ func TestCreateRead(t *testing.T) {
112115
}
113116

114117
func TestCreateUpdateRead(t *testing.T) {
118+
if testing.Short() {
119+
t.Skip("skipping slow test in -short mode")
120+
}
115121
test := func(s_ kv.Txn) {
116122
s := New(s_)
117123
des := createDocuments(&s, sampleDocuments("Initial", 5))
@@ -125,6 +131,9 @@ func TestCreateUpdateRead(t *testing.T) {
125131
}
126132

127133
func TestIterator(t *testing.T) {
134+
if testing.Short() {
135+
t.Skip("skipping slow test in -short mode")
136+
}
128137
test := func(s_ kv.Txn) {
129138
s := New(s_)
130139
createDocuments(&s, sampleDocuments("Foo", 5))
@@ -175,6 +184,9 @@ func TestIterator(t *testing.T) {
175184
}
176185

177186
func TestAllDocumentEntities(t *testing.T) {
187+
if testing.Short() {
188+
t.Skip("skipping slow test in -short mode")
189+
}
178190
test := func(s_ kv.Txn) {
179191
s := New(s_)
180192
want := createDocuments(&s, sampleDocuments("All", 5))

0 commit comments

Comments
 (0)