@@ -13,7 +13,7 @@ use influxdb::{Client, Error, Query, Timestamp};
1313///
1414/// This test case tests whether the InfluxDB server can be connected to and gathers info about it - tested with async_std
1515#[ async_std:: test]
16- #[ cfg( not( tarpaulin_include) ) ]
16+ #[ cfg( not( any ( tarpaulin_include, feature = "reqwest" ) ) ) ]
1717async fn test_ping_influx_db_async_std ( ) {
1818 let client = create_client ( "notusedhere" ) ;
1919 let result = client. ping ( ) . await ;
@@ -29,7 +29,8 @@ async fn test_ping_influx_db_async_std() {
2929/// INTEGRATION TEST
3030///
3131/// This test case tests whether the InfluxDB server can be connected to and gathers info about it * tested with tokio
32- #[ tokio:: test]
32+ #[ cfg_attr( feature = "surf" , tokio02:: test) ]
33+ #[ cfg_attr( feature = "reqwest" , tokio:: test) ]
3334#[ cfg( not( tarpaulin_include) ) ]
3435async fn test_ping_influx_db_tokio ( ) {
3536 let client = create_client ( "notusedhere" ) ;
@@ -46,7 +47,8 @@ async fn test_ping_influx_db_tokio() {
4647/// INTEGRATION TEST
4748///
4849/// This test case tests connection error
49- #[ async_std:: test]
50+ #[ cfg_attr( feature = "surf" , tokio02:: test) ]
51+ #[ cfg_attr( feature = "reqwest" , tokio:: test) ]
5052#[ cfg( not( tarpaulin_include) ) ]
5153async fn test_connection_error ( ) {
5254 let test_name = "test_connection_error" ;
@@ -67,7 +69,8 @@ async fn test_connection_error() {
6769/// INTEGRATION TEST
6870///
6971/// This test case tests the Authentication
70- #[ async_std:: test]
72+ #[ cfg_attr( feature = "surf" , tokio02:: test) ]
73+ #[ cfg_attr( feature = "reqwest" , tokio:: test) ]
7174#[ cfg( not( tarpaulin_include) ) ]
7275async fn test_authed_write_and_read ( ) {
7376 const TEST_NAME : & str = "test_authed_write_and_read" ;
@@ -115,7 +118,8 @@ async fn test_authed_write_and_read() {
115118/// INTEGRATION TEST
116119///
117120/// This test case tests the Authentication
118- #[ async_std:: test]
121+ #[ cfg_attr( feature = "surf" , tokio02:: test) ]
122+ #[ cfg_attr( feature = "reqwest" , tokio:: test) ]
119123#[ cfg( not( tarpaulin_include) ) ]
120124async fn test_wrong_authed_write_and_read ( ) {
121125 const TEST_NAME : & str = "test_wrong_authed_write_and_read" ;
@@ -185,7 +189,8 @@ async fn test_wrong_authed_write_and_read() {
185189/// INTEGRATION TEST
186190///
187191/// This test case tests the Authentication
188- #[ async_std:: test]
192+ #[ cfg_attr( feature = "surf" , tokio02:: test) ]
193+ #[ cfg_attr( feature = "reqwest" , tokio:: test) ]
189194#[ cfg( not( tarpaulin_include) ) ]
190195async fn test_non_authed_write_and_read ( ) {
191196 const TEST_NAME : & str = "test_non_authed_write_and_read" ;
@@ -240,7 +245,8 @@ async fn test_non_authed_write_and_read() {
240245/// INTEGRATION TEST
241246///
242247/// This integration tests that writing data and retrieving the data again is working
243- #[ async_std:: test]
248+ #[ cfg_attr( feature = "surf" , tokio02:: test) ]
249+ #[ cfg_attr( feature = "reqwest" , tokio:: test) ]
244250#[ cfg( not( tarpaulin_include) ) ]
245251async fn test_write_and_read_field ( ) {
246252 const TEST_NAME : & str = "test_write_field" ;
@@ -273,7 +279,8 @@ async fn test_write_and_read_field() {
273279/// INTEGRATION TEST
274280///
275281/// This integration tests that writing data and retrieving the data again is working
276- #[ async_std:: test]
282+ #[ cfg_attr( feature = "surf" , tokio02:: test) ]
283+ #[ cfg_attr( feature = "reqwest" , tokio:: test) ]
277284#[ cfg( feature = "use-serde" ) ]
278285#[ cfg( not( tarpaulin_include) ) ]
279286async fn test_write_and_read_option ( ) {
@@ -335,7 +342,8 @@ async fn test_write_and_read_option() {
335342///
336343/// This test case tests whether JSON can be decoded from a InfluxDB response and whether that JSON
337344/// is equal to the data which was written to the database
338- #[ async_std:: test]
345+ #[ cfg_attr( feature = "surf" , tokio02:: test) ]
346+ #[ cfg_attr( feature = "reqwest" , tokio:: test) ]
339347#[ cfg( feature = "use-serde" ) ]
340348#[ cfg( not( tarpaulin_include) ) ]
341349async fn test_json_query ( ) {
@@ -386,8 +394,9 @@ async fn test_json_query() {
386394/// INTEGRATION TEST
387395///
388396/// This test case tests whether the response to a GROUP BY can be parsed by
389- // deserialize_next_tagged into a tags struct
390- #[ async_std:: test]
397+ /// deserialize_next_tagged into a tags struct
398+ #[ cfg_attr( feature = "surf" , tokio02:: test) ]
399+ #[ cfg_attr( feature = "reqwest" , tokio:: test) ]
391400#[ cfg( feature = "use-serde" ) ]
392401#[ cfg( not( tarpaulin_include) ) ]
393402async fn test_json_query_tagged ( ) {
@@ -451,8 +460,8 @@ async fn test_json_query_tagged() {
451460///
452461/// This test case tests whether JSON can be decoded from a InfluxDB response and wether that JSON
453462/// is equal to the data which was written to the database
454- /// (tested with tokio)
455- #[ tokio:: test]
463+ # [ cfg_attr ( feature = "surf" , tokio02 :: test ) ]
464+ #[ cfg_attr ( feature = "reqwest" , tokio:: test) ]
456465#[ cfg( feature = "use-serde" ) ]
457466#[ cfg( not( tarpaulin_include) ) ]
458467async fn test_json_query_vec ( ) {
@@ -503,7 +512,8 @@ async fn test_json_query_vec() {
503512/// INTEGRATION TEST
504513///
505514/// This integration test tests whether using the wrong query method fails building the query
506- #[ async_std:: test]
515+ #[ cfg_attr( feature = "surf" , tokio02:: test) ]
516+ #[ cfg_attr( feature = "reqwest" , tokio:: test) ]
507517#[ cfg( feature = "use-serde" ) ]
508518#[ cfg( not( tarpaulin_include) ) ]
509519async fn test_serde_multi_query ( ) {
@@ -580,7 +590,8 @@ async fn test_serde_multi_query() {
580590/// INTEGRATION TEST
581591///
582592/// This integration test tests whether using the wrong query method fails building the query
583- #[ async_std:: test]
593+ #[ cfg_attr( feature = "surf" , tokio02:: test) ]
594+ #[ cfg_attr( feature = "reqwest" , tokio:: test) ]
584595#[ cfg( feature = "use-serde" ) ]
585596#[ cfg( not( tarpaulin_include) ) ]
586597async fn test_wrong_query_errors ( ) {
0 commit comments