Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

Commit

Permalink
make circleci not fail the CI when benchmarks skip
Browse files Browse the repository at this point in the history
while the go test command exit(0)'s, i guess CI parses the output and
looks for failures.  So we need to print the skips a bit more gently
  • Loading branch information
Dieterbe committed Nov 15, 2016
1 parent 4b616f9 commit 6cae778
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ test:
override:
- cd $IMPORTPATH && go test -v -race $(go list ./... | grep -v /vendor/)
- cd $IMPORTPATH && go vet $(go list ./... | grep -v /vendor/)
- cd $IMPORTPATH && go test -v -run='^$' -bench=. $(go list ./... | grep -v /vendor/)
- cd $IMPORTPATH && scripts/end2end_test.sh
- cd $IMPORTPATH && go test -run='^$' -bench=. $(go list ./... | grep -v /vendor/)
post:
- scripts/package.sh
dependencies:
Expand Down
8 changes: 4 additions & 4 deletions idx/cassandra/cassandra_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,13 +218,13 @@ func BenchmarkIndexing(b *testing.B) {
ix := New()
tmpSession, err := ix.cluster.CreateSession()
if err != nil {
b.Fatalf("can't connect to cassandra: %s", err)
b.Skipf("can't connect to cassandra: %s", err)
}
tmpSession.Query("TRUNCATE raintank.metric_def_idx").Exec()
tmpSession.Close()
stats, err := helper.New(false, "", "standard", "metrictank", "")
if err != nil {
b.Fatalf("can't connect to cassandra: %s", err)
b.Skipf("can't connect to cassandra: %s", err)
}
ix.Init(stats)

Expand Down Expand Up @@ -263,13 +263,13 @@ func BenchmarkLoad(b *testing.B) {
stats, _ := helper.New(false, "", "standard", "metrictank", "")
tmpSession, err := ix.cluster.CreateSession()
if err != nil {
b.Fatalf("can't connect to cassandra: %s", err)
b.Skipf("can't connect to cassandra: %s", err)
}
tmpSession.Query("TRUNCATE raintank.metric_def_idx").Exec()
tmpSession.Close()
err = ix.Init(stats)
if err != nil {
b.Fatalf("can't initialize cassandra: %s", err)
b.Skipf("can't initialize cassandra: %s", err)
}
insertDefs(ix, b.N)
ix.Stop()
Expand Down
2 changes: 1 addition & 1 deletion idx/elasticsearch/elasticsearch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ func BenchmarkIndexing(b *testing.B) {
stats, _ := helper.New(false, "", "standard", "metrictank", "")
err := ix.Init(stats)
if err != nil {
b.Fatalf("can't connect to ES: %s", err)
b.Skipf("can't connect to ES: %s", err)
}

var series string
Expand Down

0 comments on commit 6cae778

Please sign in to comment.