@@ -921,7 +921,7 @@ mod test {
921921 #[ mononoke:: fbinit_test]
922922 async fn basic_test ( fb : FacebookInit ) -> Result < ( ) > {
923923 let initial = Duration :: from_secs ( 30 * 24 * 60 * 60 ) ;
924- let grace = Duration :: from_secs ( 6 * 60 * 60 ) ;
924+ let grace = Duration :: from_hours ( 6 ) ;
925925 let ( ctx, blobstore, repo_blobstore, eph) =
926926 bootstrap ( fb, initial, grace, BubbleDeletionMode :: MarkAndDelete ) ?;
927927 let key = "test_key" . to_string ( ) ;
@@ -987,7 +987,7 @@ mod test {
987987 #[ mononoke:: fbinit_test]
988988 async fn basic_test_with_labels ( fb : FacebookInit ) -> Result < ( ) > {
989989 let initial = Duration :: from_secs ( 30 * 24 * 60 * 60 ) ;
990- let grace = Duration :: from_secs ( 6 * 60 * 60 ) ;
990+ let grace = Duration :: from_hours ( 6 ) ;
991991 let ( ctx, _, _, eph) = bootstrap ( fb, initial, grace, BubbleDeletionMode :: MarkAndDelete ) ?;
992992 let labels = vec ! [ "workspace" . to_string( ) , "debug_version" . to_string( ) ] ;
993993 // Create a bubble with labels associated to it.
@@ -1009,7 +1009,7 @@ mod test {
10091009 #[ mononoke:: fbinit_test]
10101010 async fn add_bubble_labels_test ( fb : FacebookInit ) -> Result < ( ) > {
10111011 let initial = Duration :: from_secs ( 30 * 24 * 60 * 60 ) ;
1012- let grace = Duration :: from_secs ( 6 * 60 * 60 ) ;
1012+ let grace = Duration :: from_hours ( 6 ) ;
10131013 let ( ctx, _, _, eph) = bootstrap ( fb, initial, grace, BubbleDeletionMode :: MarkAndDelete ) ?;
10141014 // Create a bubble with labels associated to it.
10151015 let bubble = eph. create_bubble ( & ctx, None , vec ! [ ] ) . await ?;
@@ -1035,7 +1035,7 @@ mod test {
10351035 #[ mononoke:: fbinit_test]
10361036 async fn add_duplicate_bubble_labels_test ( fb : FacebookInit ) -> Result < ( ) > {
10371037 let initial = Duration :: from_secs ( 30 * 24 * 60 * 60 ) ;
1038- let grace = Duration :: from_secs ( 6 * 60 * 60 ) ;
1038+ let grace = Duration :: from_hours ( 6 ) ;
10391039 let ( ctx, _, _, eph) = bootstrap ( fb, initial, grace, BubbleDeletionMode :: MarkAndDelete ) ?;
10401040 // Create a bubble with labels associated to it.
10411041 let bubble = eph. create_bubble ( & ctx, None , vec ! [ ] ) . await ?;
@@ -1068,7 +1068,7 @@ mod test {
10681068 #[ mononoke:: fbinit_test]
10691069 async fn add_empty_bubble_labels_test ( fb : FacebookInit ) -> Result < ( ) > {
10701070 let initial = Duration :: from_secs ( 30 * 24 * 60 * 60 ) ;
1071- let grace = Duration :: from_secs ( 6 * 60 * 60 ) ;
1071+ let grace = Duration :: from_hours ( 6 ) ;
10721072 let ( ctx, _, _, eph) = bootstrap ( fb, initial, grace, BubbleDeletionMode :: MarkAndDelete ) ?;
10731073 // Create a bubble with labels associated to it.
10741074 let bubble = eph. create_bubble ( & ctx, None , vec ! [ ] ) . await ?;
@@ -1088,7 +1088,7 @@ mod test {
10881088 #[ mononoke:: fbinit_test]
10891089 async fn empty_labels_from_bubble_test ( fb : FacebookInit ) -> Result < ( ) > {
10901090 let initial = Duration :: from_secs ( 30 * 24 * 60 * 60 ) ;
1091- let grace = Duration :: from_secs ( 6 * 60 * 60 ) ;
1091+ let grace = Duration :: from_hours ( 6 ) ;
10921092 let ( ctx, _, _, eph) = bootstrap ( fb, initial, grace, BubbleDeletionMode :: MarkAndDelete ) ?;
10931093 // Create a bubble with no labels associated to it.
10941094 let bubble = eph. create_bubble ( & ctx, None , vec ! [ ] ) . await ?;
@@ -1103,7 +1103,7 @@ mod test {
11031103 #[ mononoke:: fbinit_test]
11041104 async fn non_empty_labels_from_bubble_test ( fb : FacebookInit ) -> Result < ( ) > {
11051105 let initial = Duration :: from_secs ( 30 * 24 * 60 * 60 ) ;
1106- let grace = Duration :: from_secs ( 6 * 60 * 60 ) ;
1106+ let grace = Duration :: from_hours ( 6 ) ;
11071107 let ( ctx, _, _, eph) = bootstrap ( fb, initial, grace, BubbleDeletionMode :: MarkAndDelete ) ?;
11081108 let labels = vec ! [ "workspace" . to_string( ) , "debug" . to_string( ) ] ;
11091109 // Create a bubble with some labels associated to it.
@@ -1120,7 +1120,7 @@ mod test {
11201120 #[ mononoke:: fbinit_test]
11211121 async fn added_removed_labels_from_bubble_test ( fb : FacebookInit ) -> Result < ( ) > {
11221122 let initial = Duration :: from_secs ( 30 * 24 * 60 * 60 ) ;
1123- let grace = Duration :: from_secs ( 6 * 60 * 60 ) ;
1123+ let grace = Duration :: from_hours ( 6 ) ;
11241124 let ( ctx, _, _, eph) = bootstrap ( fb, initial, grace, BubbleDeletionMode :: MarkAndDelete ) ?;
11251125 // Create a bubble with no labels associated to it.
11261126 let bubble = eph. create_bubble ( & ctx, None , vec ! [ ] ) . await ?;
@@ -1146,7 +1146,7 @@ mod test {
11461146 #[ mononoke:: fbinit_test]
11471147 async fn remove_bubble_labels_test ( fb : FacebookInit ) -> Result < ( ) > {
11481148 let initial = Duration :: from_secs ( 30 * 24 * 60 * 60 ) ;
1149- let grace = Duration :: from_secs ( 6 * 60 * 60 ) ;
1149+ let grace = Duration :: from_hours ( 6 ) ;
11501150 let ( ctx, _, _, eph) = bootstrap ( fb, initial, grace, BubbleDeletionMode :: MarkAndDelete ) ?;
11511151 let labels = vec ! [ "workspace" . to_string( ) , "debug_version" . to_string( ) ] ;
11521152 // Create a bubble with labels associated to it.
@@ -1173,7 +1173,7 @@ mod test {
11731173 #[ mononoke:: fbinit_test]
11741174 async fn partial_remove_bubble_labels_test ( fb : FacebookInit ) -> Result < ( ) > {
11751175 let initial = Duration :: from_secs ( 30 * 24 * 60 * 60 ) ;
1176- let grace = Duration :: from_secs ( 6 * 60 * 60 ) ;
1176+ let grace = Duration :: from_hours ( 6 ) ;
11771177 let ( ctx, _, _, eph) = bootstrap ( fb, initial, grace, BubbleDeletionMode :: MarkAndDelete ) ?;
11781178 // Create a bubble with labels associated to it.
11791179 let bubble = eph
@@ -1198,7 +1198,7 @@ mod test {
11981198 #[ mononoke:: fbinit_test]
11991199 async fn remove_absent_bubble_labels_test ( fb : FacebookInit ) -> Result < ( ) > {
12001200 let initial = Duration :: from_secs ( 30 * 24 * 60 * 60 ) ;
1201- let grace = Duration :: from_secs ( 6 * 60 * 60 ) ;
1201+ let grace = Duration :: from_hours ( 6 ) ;
12021202 let ( ctx, _, _, eph) = bootstrap ( fb, initial, grace, BubbleDeletionMode :: MarkAndDelete ) ?;
12031203 // Create a bubble with labels associated to it.
12041204 let labels = vec ! [ "workspace" . to_string( ) , "debug_version" . to_string( ) ] ;
@@ -1228,7 +1228,7 @@ mod test {
12281228 #[ mononoke:: fbinit_test]
12291229 async fn remove_duplicate_bubble_labels_test ( fb : FacebookInit ) -> Result < ( ) > {
12301230 let initial = Duration :: from_secs ( 30 * 24 * 60 * 60 ) ;
1231- let grace = Duration :: from_secs ( 6 * 60 * 60 ) ;
1231+ let grace = Duration :: from_hours ( 6 ) ;
12321232 let ( ctx, _, _, eph) = bootstrap ( fb, initial, grace, BubbleDeletionMode :: MarkAndDelete ) ?;
12331233 // Create a bubble with labels associated to it.
12341234 let labels = vec ! [ "workspace" . to_string( ) , "debug_version" . to_string( ) ] ;
@@ -1259,7 +1259,7 @@ mod test {
12591259 #[ mononoke:: fbinit_test]
12601260 async fn remove_all_bubble_labels_without_input_test ( fb : FacebookInit ) -> Result < ( ) > {
12611261 let initial = Duration :: from_secs ( 30 * 24 * 60 * 60 ) ;
1262- let grace = Duration :: from_secs ( 6 * 60 * 60 ) ;
1262+ let grace = Duration :: from_hours ( 6 ) ;
12631263 let ( ctx, _, _, eph) = bootstrap ( fb, initial, grace, BubbleDeletionMode :: MarkAndDelete ) ?;
12641264 // Create a bubble with labels associated to it.
12651265 let labels = vec ! [ "workspace" . to_string( ) , "debug_version" . to_string( ) ] ;
@@ -1278,7 +1278,7 @@ mod test {
12781278 #[ mononoke:: fbinit_test]
12791279 async fn remove_all_bubble_labels_with_empty_bubble_test ( fb : FacebookInit ) -> Result < ( ) > {
12801280 let initial = Duration :: from_secs ( 30 * 24 * 60 * 60 ) ;
1281- let grace = Duration :: from_secs ( 6 * 60 * 60 ) ;
1281+ let grace = Duration :: from_hours ( 6 ) ;
12821282 let ( ctx, _, _, eph) = bootstrap ( fb, initial, grace, BubbleDeletionMode :: MarkAndDelete ) ?;
12831283 // Create a bubble with no labels associated to it.
12841284 let bubble = eph. create_bubble ( & ctx, None , Vec :: new ( ) ) . await ?;
@@ -1297,7 +1297,7 @@ mod test {
12971297 #[ mononoke:: fbinit_test]
12981298 async fn add_and_remove_bubble_labels_test ( fb : FacebookInit ) -> Result < ( ) > {
12991299 let initial = Duration :: from_secs ( 30 * 24 * 60 * 60 ) ;
1300- let grace = Duration :: from_secs ( 6 * 60 * 60 ) ;
1300+ let grace = Duration :: from_hours ( 6 ) ;
13011301 let ( ctx, _, _, eph) = bootstrap ( fb, initial, grace, BubbleDeletionMode :: MarkAndDelete ) ?;
13021302 // Create a bubble with labels associated to it.
13031303 let bubble = eph. create_bubble ( & ctx, None , vec ! [ ] ) . await ?;
@@ -1337,7 +1337,7 @@ mod test {
13371337 #[ mononoke:: fbinit_test]
13381338 async fn create_and_fetch_labels_test ( fb : FacebookInit ) -> Result < ( ) > {
13391339 let initial = Duration :: from_secs ( 30 * 24 * 60 * 60 ) ;
1340- let grace = Duration :: from_secs ( 6 * 60 * 60 ) ;
1340+ let grace = Duration :: from_hours ( 6 ) ;
13411341 let ( ctx, _, _, eph) = bootstrap ( fb, initial, grace, BubbleDeletionMode :: MarkAndDelete ) ?;
13421342 let labels = vec ! [ "workspace" . to_string( ) , "debug_version" . to_string( ) ] ;
13431343 // Create a bubble with labels associated to it.
@@ -1359,7 +1359,7 @@ mod test {
13591359 #[ mononoke:: fbinit_test]
13601360 async fn create_and_fetch_active_test ( fb : FacebookInit ) -> Result < ( ) > {
13611361 let initial = Duration :: from_secs ( 30 * 24 * 60 * 60 ) ;
1362- let grace = Duration :: from_secs ( 6 * 60 * 60 ) ;
1362+ let grace = Duration :: from_hours ( 6 ) ;
13631363 let ( ctx, _, _, eph) = bootstrap ( fb, initial, grace, BubbleDeletionMode :: MarkAndDelete ) ?;
13641364 let bubble1 = eph. create_bubble ( & ctx, None , vec ! [ ] ) . await ?;
13651365 // Ensure a newly created bubble exists in Active status
@@ -1373,7 +1373,7 @@ mod test {
13731373 #[ mononoke:: fbinit_test]
13741374 async fn deletion_mode_disabled_test ( fb : FacebookInit ) -> Result < ( ) > {
13751375 let initial = Duration :: from_secs ( 30 * 24 * 60 * 60 ) ;
1376- let grace = Duration :: from_secs ( 6 * 60 * 60 ) ;
1376+ let grace = Duration :: from_hours ( 6 ) ;
13771377 // We want an ephemeral store where deletion is disabled.
13781378 let ( ctx, _, _, eph) = bootstrap ( fb, initial, grace, BubbleDeletionMode :: Disabled ) ?;
13791379 // Create an empty bubble.
@@ -1396,7 +1396,7 @@ mod test {
13961396 #[ mononoke:: fbinit_test]
13971397 async fn deletion_mode_markonly_test ( fb : FacebookInit ) -> Result < ( ) > {
13981398 let initial = Duration :: from_secs ( 30 * 24 * 60 * 60 ) ;
1399- let grace = Duration :: from_secs ( 6 * 60 * 60 ) ;
1399+ let grace = Duration :: from_hours ( 6 ) ;
14001400 // We want an ephemeral store where deletion mode is mark only.
14011401 let ( ctx, blobstore, repo_blobstore, eph) =
14021402 bootstrap ( fb, initial, grace, BubbleDeletionMode :: MarkOnly ) ?;
@@ -1447,7 +1447,7 @@ mod test {
14471447 #[ mononoke:: fbinit_test]
14481448 async fn delete_empty_bubble_test ( fb : FacebookInit ) -> Result < ( ) > {
14491449 let initial = Duration :: from_secs ( 30 * 24 * 60 * 60 ) ;
1450- let grace = Duration :: from_secs ( 6 * 60 * 60 ) ;
1450+ let grace = Duration :: from_hours ( 6 ) ;
14511451 let ( ctx, _, _, eph) = bootstrap ( fb, initial, grace, BubbleDeletionMode :: MarkAndDelete ) ?;
14521452 // Create an empty bubble.
14531453 let bubble1 = eph. create_bubble ( & ctx, None , vec ! [ ] ) . await ?;
@@ -1461,7 +1461,7 @@ mod test {
14611461 #[ mononoke:: fbinit_test]
14621462 async fn delete_empty_bubble_with_label_test ( fb : FacebookInit ) -> Result < ( ) > {
14631463 let initial = Duration :: from_secs ( 30 * 24 * 60 * 60 ) ;
1464- let grace = Duration :: from_secs ( 6 * 60 * 60 ) ;
1464+ let grace = Duration :: from_hours ( 6 ) ;
14651465 let ( ctx, _, _, eph) = bootstrap ( fb, initial, grace, BubbleDeletionMode :: MarkAndDelete ) ?;
14661466 // Create an empty bubble with labels.
14671467 let labels = vec ! [ "workspace" . to_string( ) , "test" . to_string( ) ] ;
@@ -1476,7 +1476,7 @@ mod test {
14761476 #[ mononoke:: fbinit_test]
14771477 async fn delete_nonempty_bubble_test ( fb : FacebookInit ) -> Result < ( ) > {
14781478 let initial = Duration :: from_secs ( 30 * 24 * 60 * 60 ) ;
1479- let grace = Duration :: from_secs ( 6 * 60 * 60 ) ;
1479+ let grace = Duration :: from_hours ( 6 ) ;
14801480 let ( ctx, blobstore, repo_blobstore, eph) =
14811481 bootstrap ( fb, initial, grace, BubbleDeletionMode :: MarkAndDelete ) ?;
14821482 // Create a bubble and add data to it.
@@ -1528,7 +1528,7 @@ mod test {
15281528 #[ mononoke:: fbinit_test]
15291529 async fn reopen_deleted_bubble_test ( fb : FacebookInit ) -> Result < ( ) > {
15301530 let initial = Duration :: from_secs ( 30 * 24 * 60 * 60 ) ;
1531- let grace = Duration :: from_secs ( 6 * 60 * 60 ) ;
1531+ let grace = Duration :: from_hours ( 6 ) ;
15321532 let ( ctx, _, repo_blobstore, eph) =
15331533 bootstrap ( fb, initial, grace, BubbleDeletionMode :: MarkAndDelete ) ?;
15341534 // Create a bubble and add data to it.
0 commit comments