clean up integration tests

This commit is contained in:
bergquist
2018-12-12 07:30:08 +01:00
parent 823bba8d98
commit c565b018c5
3 changed files with 28 additions and 62 deletions

View File

@ -3,10 +3,8 @@ package serverlock
import (
"context"
"testing"
"time"
"github.com/grafana/grafana/pkg/log"
"github.com/grafana/grafana/pkg/services/sqlstore"
. "github.com/smartystreets/goconvey/convey"
)
@ -45,11 +43,11 @@ func TestServerLock(t *testing.T) {
})
Convey("Should be able to create lock on first row", func() {
gotLock, err := sl.acquireLock(context.Background(), first, time.Second*1)
gotLock, err := sl.acquireLock(context.Background(), first)
So(err, ShouldBeNil)
So(gotLock, ShouldBeTrue)
gotLock, err = sl.acquireLock(context.Background(), first, time.Second*1)
gotLock, err = sl.acquireLock(context.Background(), first)
So(err, ShouldBeNil)
So(gotLock, ShouldBeFalse)
})