PingContext test (#1103)
This commit is contained in:
parent
1261905a94
commit
fa23a9774a
|
@ -7,7 +7,9 @@
|
||||||
package xorm
|
package xorm
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"context"
|
||||||
"testing"
|
"testing"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
)
|
)
|
||||||
|
@ -15,10 +17,9 @@ import (
|
||||||
func TestPingContext(t *testing.T) {
|
func TestPingContext(t *testing.T) {
|
||||||
assert.NoError(t, prepareEngine())
|
assert.NoError(t, prepareEngine())
|
||||||
|
|
||||||
// TODO: Since EngineInterface should be compitable with old Go version, PingContext is not supported.
|
ctx, canceled := context.WithTimeout(context.Background(), 10*time.Second)
|
||||||
/*
|
defer canceled()
|
||||||
ctx, _ := context.WithTimeout(context.Background(), 10*time.Second)
|
|
||||||
err := testEngine.PingContext(ctx)
|
err := testEngine.(*Engine).PingContext(ctx)
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue