Skip to content

Commit 74664bc

Browse files
jayantsing-dbclaude
andcommitted
Fix connector tests to expect ExecutionProtocol default
Update connector test expectations to include ExecutionProtocol: 'thrift' as the default value, consistent with the new configuration defaults. This fixes test failures in: - Connector initialized with functional options - Connector initialized minimal settings - Connector initialized with retries turned off 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 80c08db commit 74664bc

File tree

1 file changed

+44
-41
lines changed

1 file changed

+44
-41
lines changed

connector_test.go

Lines changed: 44 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -50,23 +50,24 @@ func TestNewConnector(t *testing.T) {
5050
CloudFetchSpeedThresholdMbps: 0.1,
5151
}
5252
expectedUserConfig := config.UserConfig{
53-
Host: host,
54-
Port: port,
55-
Protocol: "https",
56-
AccessToken: accessToken,
57-
Authenticator: &pat.PATAuth{AccessToken: accessToken},
58-
HTTPPath: "/" + httpPath,
59-
MaxRows: maxRows,
60-
QueryTimeout: timeout,
61-
Catalog: catalog,
62-
Schema: schema,
63-
UserAgentEntry: userAgentEntry,
64-
SessionParams: sessionParams,
65-
RetryMax: 10,
66-
RetryWaitMin: 3 * time.Second,
67-
RetryWaitMax: 60 * time.Second,
68-
Transport: roundTripper,
69-
CloudFetchConfig: expectedCloudFetchConfig,
53+
Host: host,
54+
Port: port,
55+
Protocol: "https",
56+
AccessToken: accessToken,
57+
Authenticator: &pat.PATAuth{AccessToken: accessToken},
58+
HTTPPath: "/" + httpPath,
59+
MaxRows: maxRows,
60+
QueryTimeout: timeout,
61+
Catalog: catalog,
62+
Schema: schema,
63+
UserAgentEntry: userAgentEntry,
64+
SessionParams: sessionParams,
65+
RetryMax: 10,
66+
RetryWaitMin: 3 * time.Second,
67+
RetryWaitMax: 60 * time.Second,
68+
Transport: roundTripper,
69+
ExecutionProtocol: "thrift",
70+
CloudFetchConfig: expectedCloudFetchConfig,
7071
}
7172
expectedCfg := config.WithDefaults()
7273
expectedCfg.DriverVersion = DriverVersion
@@ -97,18 +98,19 @@ func TestNewConnector(t *testing.T) {
9798
CloudFetchSpeedThresholdMbps: 0.1,
9899
}
99100
expectedUserConfig := config.UserConfig{
100-
Host: host,
101-
Port: port,
102-
Protocol: "https",
103-
AccessToken: accessToken,
104-
Authenticator: &pat.PATAuth{AccessToken: accessToken},
105-
HTTPPath: "/" + httpPath,
106-
MaxRows: maxRows,
107-
SessionParams: sessionParams,
108-
RetryMax: 4,
109-
RetryWaitMin: 1 * time.Second,
110-
RetryWaitMax: 30 * time.Second,
111-
CloudFetchConfig: expectedCloudFetchConfig,
101+
Host: host,
102+
Port: port,
103+
Protocol: "https",
104+
AccessToken: accessToken,
105+
Authenticator: &pat.PATAuth{AccessToken: accessToken},
106+
HTTPPath: "/" + httpPath,
107+
MaxRows: maxRows,
108+
SessionParams: sessionParams,
109+
RetryMax: 4,
110+
RetryWaitMin: 1 * time.Second,
111+
RetryWaitMax: 30 * time.Second,
112+
ExecutionProtocol: "thrift",
113+
CloudFetchConfig: expectedCloudFetchConfig,
112114
}
113115
expectedCfg := config.WithDefaults()
114116
expectedCfg.UserConfig = expectedUserConfig
@@ -139,18 +141,19 @@ func TestNewConnector(t *testing.T) {
139141
CloudFetchSpeedThresholdMbps: 0.1,
140142
}
141143
expectedUserConfig := config.UserConfig{
142-
Host: host,
143-
Port: port,
144-
Protocol: "https",
145-
AccessToken: accessToken,
146-
Authenticator: &pat.PATAuth{AccessToken: accessToken},
147-
HTTPPath: "/" + httpPath,
148-
MaxRows: maxRows,
149-
SessionParams: sessionParams,
150-
RetryMax: -1,
151-
RetryWaitMin: 0,
152-
RetryWaitMax: 0,
153-
CloudFetchConfig: expectedCloudFetchConfig,
144+
Host: host,
145+
Port: port,
146+
Protocol: "https",
147+
AccessToken: accessToken,
148+
Authenticator: &pat.PATAuth{AccessToken: accessToken},
149+
HTTPPath: "/" + httpPath,
150+
MaxRows: maxRows,
151+
SessionParams: sessionParams,
152+
RetryMax: -1,
153+
RetryWaitMin: 0,
154+
RetryWaitMax: 0,
155+
ExecutionProtocol: "thrift",
156+
CloudFetchConfig: expectedCloudFetchConfig,
154157
}
155158
expectedCfg := config.WithDefaults()
156159
expectedCfg.DriverVersion = DriverVersion

0 commit comments

Comments
 (0)