@@ -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 ( ) . await . 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 ( ) . await . 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 ( ) . await . 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 ( ) . await . 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 ( ) ;
@@ -289,7 +292,7 @@ async fn test_produce_consume_size_cutoff() {
289
292
let connection = maybe_skip_kafka_integration ! ( ) ;
290
293
let topic_name = random_topic_name ( ) ;
291
294
292
- let client = ClientBuilder :: new ( vec ! [ connection] ) . build ( ) . await . unwrap ( ) ;
295
+ let client = ClientBuilder :: new ( connection) . build ( ) . await . unwrap ( ) ;
293
296
let controller_client = client. controller_client ( ) . await . unwrap ( ) ;
294
297
controller_client
295
298
. create_topic ( & topic_name, 1 , 1 , 5_000 )
@@ -362,7 +365,7 @@ async fn test_consume_midbatch() {
362
365
let connection = maybe_skip_kafka_integration ! ( ) ;
363
366
let topic_name = random_topic_name ( ) ;
364
367
365
- let client = ClientBuilder :: new ( vec ! [ connection] ) . build ( ) . await . unwrap ( ) ;
368
+ let client = ClientBuilder :: new ( connection) . build ( ) . await . unwrap ( ) ;
366
369
let controller_client = client. controller_client ( ) . await . unwrap ( ) ;
367
370
controller_client
368
371
. create_topic ( & topic_name, 1 , 1 , 5_000 )
@@ -407,7 +410,7 @@ async fn test_delete_records() {
407
410
let connection = maybe_skip_kafka_integration ! ( ) ;
408
411
let topic_name = random_topic_name ( ) ;
409
412
410
- let client = ClientBuilder :: new ( vec ! [ connection] ) . build ( ) . await . unwrap ( ) ;
413
+ let client = ClientBuilder :: new ( connection) . build ( ) . await . unwrap ( ) ;
411
414
let controller_client = client. controller_client ( ) . await . unwrap ( ) ;
412
415
controller_client
413
416
. create_topic ( & topic_name, 1 , 1 , 5_000 )
0 commit comments