context_test.go 575 B

123456789101112131415161718192021222324
  1. // Copyright 2017 The Xorm Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. // +build go1.8
  5. package xorm
  6. import (
  7. "testing"
  8. "github.com/stretchr/testify/assert"
  9. )
  10. func TestPingContext(t *testing.T) {
  11. assert.NoError(t, prepareEngine())
  12. // TODO: Since EngineInterface should be compitable with old Go version, PingContext is not supported.
  13. /*
  14. ctx, _ := context.WithTimeout(context.Background(), 10*time.Second)
  15. err := testEngine.PingContext(ctx)
  16. assert.NoError(t, err)
  17. */
  18. }