Skip to content

Commit 3c3c282

Browse files
committed
Fix tests for go1.13+
1 parent 6478dcd commit 3c3c282

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

internal/integration/reql_tests/gorethink_test.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,19 @@ package reql_tests
55
import (
66
"flag"
77
"os"
8+
"runtime"
89

910
r "gopkg.in/rethinkdb/rethinkdb-go.v5"
1011
)
1112

1213
var url string
1314

1415
func init() {
15-
flag.Parse()
16+
// Fixing test.testlogfile parsing error on Go 1.13+.
17+
if runtime.Version() < "go1.13" {
18+
flag.Parse()
19+
}
20+
1621
r.SetVerbose(true)
1722

1823
// If the test is being run by wercker look for the rethink url

internal/integration/tests/rethinkdb_test.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"fmt"
77
"math/rand"
88
"os"
9+
"runtime"
910
"testing"
1011
"time"
1112

@@ -18,7 +19,11 @@ var testdata = flag.Bool("rethinkdb.testdata", true, "create test data")
1819
var url, url1, url2, url3, db, authKey string
1920

2021
func init() {
21-
flag.Parse()
22+
// Fixing test.testlogfile parsing error on Go 1.13+.
23+
if runtime.Version() < "go1.13" {
24+
flag.Parse()
25+
}
26+
2227
r.SetVerbose(true)
2328

2429
// If the test is being run by wercker look for the rethink url

0 commit comments

Comments
 (0)