File tree Expand file tree Collapse file tree 3 files changed +9
-0
lines changed Expand file tree Collapse file tree 3 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,10 @@ use crate::ipfs::ServerAddress;
19
19
20
20
/// The request that verifies that the IPFS gateway is accessible is generally fast because
21
21
/// it does not involve querying the distributed network.
22
+ #[ cfg( not( debug_assertions) ) ]
22
23
const TEST_REQUEST_TIMEOUT : Duration = Duration :: from_secs ( 60 ) ;
24
+ #[ cfg( debug_assertions) ]
25
+ const TEST_REQUEST_TIMEOUT : Duration = Duration :: from_secs ( 1 ) ;
23
26
24
27
/// A client that connects to an IPFS gateway.
25
28
///
Original file line number Diff line number Diff line change @@ -8,7 +8,10 @@ use crate::util::futures::retry;
8
8
use crate :: util:: futures:: RetryConfig ;
9
9
10
10
/// The default maximum delay between retries.
11
+ #[ cfg( not( debug_assertions) ) ]
11
12
const DEFAULT_MAX_DELAY : Duration = Duration :: from_secs ( 60 ) ;
13
+ #[ cfg( debug_assertions) ]
14
+ const DEFAULT_MAX_DELAY : Duration = Duration :: from_secs ( 1 ) ;
12
15
13
16
/// Describes retry behavior when IPFS requests fail.
14
17
#[ derive( Clone , Copy , Debug ) ]
Original file line number Diff line number Diff line change @@ -19,7 +19,10 @@ use crate::ipfs::ServerAddress;
19
19
20
20
/// The request that verifies that the IPFS RPC API is accessible is generally fast because
21
21
/// it does not involve querying the distributed network.
22
+ #[ cfg( not( debug_assertions) ) ]
22
23
const TEST_REQUEST_TIMEOUT : Duration = Duration :: from_secs ( 60 ) ;
24
+ #[ cfg( debug_assertions) ]
25
+ const TEST_REQUEST_TIMEOUT : Duration = Duration :: from_secs ( 1 ) ;
23
26
24
27
/// A client that connects to an IPFS RPC API.
25
28
///
You can’t perform that action at this time.
0 commit comments