@@ -17,15 +17,15 @@ async fn test_plain() {
17
17
maybe_start_logging ( ) ;
18
18
19
19
let connection = maybe_skip_kafka_integration ! ( ) ;
20
- ClientBuilder :: new ( vec ! [ connection] ) . build ( ) . await . unwrap ( ) ;
20
+ ClientBuilder :: new ( connection) . build ( ) . await . unwrap ( ) ;
21
21
}
22
22
23
23
#[ tokio:: test]
24
24
async fn test_topic_crud ( ) {
25
25
maybe_start_logging ( ) ;
26
26
27
27
let connection = maybe_skip_kafka_integration ! ( ) ;
28
- let client = ClientBuilder :: new ( vec ! [ connection] ) . build ( ) . await . unwrap ( ) ;
28
+ let client = ClientBuilder :: new ( connection) . build ( ) . await . unwrap ( ) ;
29
29
let controller_client = client. controller_client ( ) . unwrap ( ) ;
30
30
let topics = client. list_topics ( ) . await . unwrap ( ) ;
31
31
@@ -109,22 +109,25 @@ async fn test_tls() {
109
109
. unwrap ( ) ;
110
110
111
111
let connection = maybe_skip_kafka_integration ! ( ) ;
112
- ClientBuilder :: new ( vec ! [ connection] )
112
+ ClientBuilder :: new ( connection)
113
113
. tls_config ( Arc :: new ( config) )
114
114
. build ( )
115
115
. await
116
116
. unwrap ( ) ;
117
117
}
118
118
119
- // Disabled as currently no SOCKS5 integration tests
120
119
#[ cfg( feature = "transport-socks5" ) ]
121
- #[ ignore]
122
120
#[ tokio:: test]
123
121
async fn test_socks5 ( ) {
124
122
maybe_start_logging ( ) ;
125
123
126
- let client = ClientBuilder :: new ( vec ! [ "my-cluster-kafka-bootstrap:9092" . to_owned( ) ] )
127
- . socks5_proxy ( "localhost:1080" . to_owned ( ) )
124
+ // e.g. "my-connection-kafka-bootstrap:9092"
125
+ let connection = maybe_skip_kafka_integration ! ( ) ;
126
+ // e.g. "localhost:1080"
127
+ let proxy = maybe_skip_SOCKS_PROXY ! ( ) ;
128
+
129
+ let client = ClientBuilder :: new ( connection)
130
+ . socks5_proxy ( proxy)
128
131
. build ( )
129
132
. await
130
133
. unwrap ( ) ;
@@ -143,7 +146,7 @@ async fn test_produce_empty() {
143
146
let topic_name = random_topic_name ( ) ;
144
147
let n_partitions = 2 ;
145
148
146
- let client = ClientBuilder :: new ( vec ! [ connection] ) . build ( ) . await . unwrap ( ) ;
149
+ let client = ClientBuilder :: new ( connection) . build ( ) . await . unwrap ( ) ;
147
150
let controller_client = client. controller_client ( ) . unwrap ( ) ;
148
151
controller_client
149
152
. create_topic ( & topic_name, n_partitions, 1 , 5_000 )
@@ -165,7 +168,7 @@ async fn test_consume_empty() {
165
168
let topic_name = random_topic_name ( ) ;
166
169
let n_partitions = 2 ;
167
170
168
- let client = ClientBuilder :: new ( vec ! [ connection] ) . build ( ) . await . unwrap ( ) ;
171
+ let client = ClientBuilder :: new ( connection) . build ( ) . await . unwrap ( ) ;
169
172
let controller_client = client. controller_client ( ) . unwrap ( ) ;
170
173
controller_client
171
174
. create_topic ( & topic_name, n_partitions, 1 , 5_000 )
@@ -189,7 +192,7 @@ async fn test_consume_offset_out_of_range() {
189
192
let topic_name = random_topic_name ( ) ;
190
193
let n_partitions = 2 ;
191
194
192
- let client = ClientBuilder :: new ( vec ! [ connection] ) . build ( ) . await . unwrap ( ) ;
195
+ let client = ClientBuilder :: new ( connection) . build ( ) . await . unwrap ( ) ;
193
196
let controller_client = client. controller_client ( ) . unwrap ( ) ;
194
197
controller_client
195
198
. create_topic ( & topic_name, n_partitions, 1 , 5_000 )
@@ -222,7 +225,7 @@ async fn test_get_offset() {
222
225
let topic_name = random_topic_name ( ) ;
223
226
let n_partitions = 1 ;
224
227
225
- let client = ClientBuilder :: new ( vec ! [ connection. clone( ) ] )
228
+ let client = ClientBuilder :: new ( connection. clone ( ) )
226
229
. build ( )
227
230
. await
228
231
. unwrap ( ) ;
@@ -286,7 +289,7 @@ async fn test_produce_consume_size_cutoff() {
286
289
let connection = maybe_skip_kafka_integration ! ( ) ;
287
290
let topic_name = random_topic_name ( ) ;
288
291
289
- let client = ClientBuilder :: new ( vec ! [ connection] ) . build ( ) . await . unwrap ( ) ;
292
+ let client = ClientBuilder :: new ( connection) . build ( ) . await . unwrap ( ) ;
290
293
let controller_client = client. controller_client ( ) . unwrap ( ) ;
291
294
controller_client
292
295
. create_topic ( & topic_name, 1 , 1 , 5_000 )
@@ -359,7 +362,7 @@ async fn test_consume_midbatch() {
359
362
let connection = maybe_skip_kafka_integration ! ( ) ;
360
363
let topic_name = random_topic_name ( ) ;
361
364
362
- let client = ClientBuilder :: new ( vec ! [ connection] ) . build ( ) . await . unwrap ( ) ;
365
+ let client = ClientBuilder :: new ( connection) . build ( ) . await . unwrap ( ) ;
363
366
let controller_client = client. controller_client ( ) . unwrap ( ) ;
364
367
controller_client
365
368
. create_topic ( & topic_name, 1 , 1 , 5_000 )
@@ -404,7 +407,7 @@ async fn test_delete_records() {
404
407
let connection = maybe_skip_kafka_integration ! ( ) ;
405
408
let topic_name = random_topic_name ( ) ;
406
409
407
- let client = ClientBuilder :: new ( vec ! [ connection] ) . build ( ) . await . unwrap ( ) ;
410
+ let client = ClientBuilder :: new ( connection) . build ( ) . await . unwrap ( ) ;
408
411
let controller_client = client. controller_client ( ) . unwrap ( ) ;
409
412
controller_client
410
413
. create_topic ( & topic_name, 1 , 1 , 5_000 )
0 commit comments