@@ -36,24 +36,33 @@ func TestNewConnector(t *testing.T) {
3636 WithSessionParams (sessionParams ),
3737 WithRetries (10 , 3 * time .Second , 60 * time .Second ),
3838 WithTransport (roundTripper ),
39+ WithCloudFetch (true ),
40+ WithMaxDownloadThreads (15 ),
3941 )
42+ expectedCloudFetchConfig := config.CloudFetchConfig {
43+ UseCloudFetch : true ,
44+ MaxDownloadThreads : 15 ,
45+ MaxFilesInMemory : 10 ,
46+ MinTimeToExpiry : 0 * time .Second ,
47+ }
4048 expectedUserConfig := config.UserConfig {
41- Host : host ,
42- Port : port ,
43- Protocol : "https" ,
44- AccessToken : accessToken ,
45- Authenticator : & pat.PATAuth {AccessToken : accessToken },
46- HTTPPath : "/" + httpPath ,
47- MaxRows : maxRows ,
48- QueryTimeout : timeout ,
49- Catalog : catalog ,
50- Schema : schema ,
51- UserAgentEntry : userAgentEntry ,
52- SessionParams : sessionParams ,
53- RetryMax : 10 ,
54- RetryWaitMin : 3 * time .Second ,
55- RetryWaitMax : 60 * time .Second ,
56- Transport : roundTripper ,
49+ Host : host ,
50+ Port : port ,
51+ Protocol : "https" ,
52+ AccessToken : accessToken ,
53+ Authenticator : & pat.PATAuth {AccessToken : accessToken },
54+ HTTPPath : "/" + httpPath ,
55+ MaxRows : maxRows ,
56+ QueryTimeout : timeout ,
57+ Catalog : catalog ,
58+ Schema : schema ,
59+ UserAgentEntry : userAgentEntry ,
60+ SessionParams : sessionParams ,
61+ RetryMax : 10 ,
62+ RetryWaitMin : 3 * time .Second ,
63+ RetryWaitMax : 60 * time .Second ,
64+ Transport : roundTripper ,
65+ CloudFetchConfig : expectedCloudFetchConfig ,
5766 }
5867 expectedCfg := config .WithDefaults ()
5968 expectedCfg .DriverVersion = DriverVersion
@@ -75,18 +84,25 @@ func TestNewConnector(t *testing.T) {
7584 WithAccessToken (accessToken ),
7685 WithHTTPPath (httpPath ),
7786 )
87+ expectedCloudFetchConfig := config.CloudFetchConfig {
88+ UseCloudFetch : false ,
89+ MaxDownloadThreads : 10 ,
90+ MaxFilesInMemory : 10 ,
91+ MinTimeToExpiry : 0 * time .Second ,
92+ }
7893 expectedUserConfig := config.UserConfig {
79- Host : host ,
80- Port : port ,
81- Protocol : "https" ,
82- AccessToken : accessToken ,
83- Authenticator : & pat.PATAuth {AccessToken : accessToken },
84- HTTPPath : "/" + httpPath ,
85- MaxRows : maxRows ,
86- SessionParams : sessionParams ,
87- RetryMax : 4 ,
88- RetryWaitMin : 1 * time .Second ,
89- RetryWaitMax : 30 * time .Second ,
94+ Host : host ,
95+ Port : port ,
96+ Protocol : "https" ,
97+ AccessToken : accessToken ,
98+ Authenticator : & pat.PATAuth {AccessToken : accessToken },
99+ HTTPPath : "/" + httpPath ,
100+ MaxRows : maxRows ,
101+ SessionParams : sessionParams ,
102+ RetryMax : 4 ,
103+ RetryWaitMin : 1 * time .Second ,
104+ RetryWaitMax : 30 * time .Second ,
105+ CloudFetchConfig : expectedCloudFetchConfig ,
90106 }
91107 expectedCfg := config .WithDefaults ()
92108 expectedCfg .UserConfig = expectedUserConfig
@@ -109,18 +125,25 @@ func TestNewConnector(t *testing.T) {
109125 WithHTTPPath (httpPath ),
110126 WithRetries (- 1 , 0 , 0 ),
111127 )
128+ expectedCloudFetchConfig := config.CloudFetchConfig {
129+ UseCloudFetch : false ,
130+ MaxDownloadThreads : 10 ,
131+ MaxFilesInMemory : 10 ,
132+ MinTimeToExpiry : 0 * time .Second ,
133+ }
112134 expectedUserConfig := config.UserConfig {
113- Host : host ,
114- Port : port ,
115- Protocol : "https" ,
116- AccessToken : accessToken ,
117- Authenticator : & pat.PATAuth {AccessToken : accessToken },
118- HTTPPath : "/" + httpPath ,
119- MaxRows : maxRows ,
120- SessionParams : sessionParams ,
121- RetryMax : - 1 ,
122- RetryWaitMin : 0 ,
123- RetryWaitMax : 0 ,
135+ Host : host ,
136+ Port : port ,
137+ Protocol : "https" ,
138+ AccessToken : accessToken ,
139+ Authenticator : & pat.PATAuth {AccessToken : accessToken },
140+ HTTPPath : "/" + httpPath ,
141+ MaxRows : maxRows ,
142+ SessionParams : sessionParams ,
143+ RetryMax : - 1 ,
144+ RetryWaitMin : 0 ,
145+ RetryWaitMax : 0 ,
146+ CloudFetchConfig : expectedCloudFetchConfig ,
124147 }
125148 expectedCfg := config .WithDefaults ()
126149 expectedCfg .DriverVersion = DriverVersion
0 commit comments