File tree Expand file tree Collapse file tree 3 files changed +9
-11
lines changed Expand file tree Collapse file tree 3 files changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ type VitessConfigurationSettings struct {
8
8
API string
9
9
Keyspace string
10
10
Shard string
11
- TimeoutSecs float64
11
+ TimeoutSecs uint
12
12
}
13
13
14
14
func (settings * VitessConfigurationSettings ) IsEmpty () bool {
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import (
12
12
"vitess.io/vitess/go/vt/proto/topodata"
13
13
)
14
14
15
- const defaultTimeout = time .Duration (5.0 ) * time .Second
15
+ const defaultTimeout = time .Duration (5 ) * time .Second
16
16
17
17
// Tablet represents information about a running instance of vttablet.
18
18
type Tablet struct {
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ func TestParseTablets(t *testing.T) {
56
56
API : vitessApi .URL ,
57
57
Keyspace : "test" ,
58
58
Shard : "00" ,
59
- TimeoutSecs : 1.0 ,
59
+ TimeoutSecs : 1 ,
60
60
})
61
61
if err != nil {
62
62
t .Fatalf ("Expected no error, got %q" , err )
@@ -77,10 +77,9 @@ func TestParseTablets(t *testing.T) {
77
77
78
78
t .Run ("not-found" , func (t * testing.T ) {
79
79
tablets , err := ParseTablets (config.VitessConfigurationSettings {
80
- API : vitessApi .URL ,
81
- Keyspace : "not-found" ,
82
- Shard : "40-80" ,
83
- TimeoutSecs : 0.0 ,
80
+ API : vitessApi .URL ,
81
+ Keyspace : "not-found" ,
82
+ Shard : "40-80" ,
84
83
})
85
84
if err != nil {
86
85
t .Fatalf ("Expected no error, got %q" , err )
@@ -98,10 +97,9 @@ func TestParseTablets(t *testing.T) {
98
97
t .Run ("failed" , func (t * testing.T ) {
99
98
vitessApi .Close () // kill the mock vitess API
100
99
_ , err := ParseTablets (config.VitessConfigurationSettings {
101
- API : vitessApi .URL ,
102
- Keyspace : "fail" ,
103
- Shard : "00" ,
104
- TimeoutSecs : 0.0 ,
100
+ API : vitessApi .URL ,
101
+ Keyspace : "fail" ,
102
+ Shard : "00" ,
105
103
})
106
104
if err == nil {
107
105
t .Fatal ("Expected error, got nil" )
You can’t perform that action at this time.
0 commit comments