@@ -27,7 +27,8 @@ fn stdio(command: Command) -> Command {
2727
2828#[ test]
2929fn deduplicate_multiple_hardlinks_to_a_single_file ( ) {
30- let workspace = SampleWorkspace :: multiple_hardlinks_to_a_single_file ( ) ;
30+ let links = 10 ;
31+ let workspace = SampleWorkspace :: multiple_hardlinks_to_a_single_file ( 100_000 , links) ;
3132
3233 let json = Command :: new ( PDU )
3334 . with_current_dir ( & workspace)
@@ -63,7 +64,7 @@ fn deduplicate_multiple_hardlinks_to_a_single_file() {
6364 children
6465 } ;
6566 let expected_children: Vec < _ > = {
66- let links = ( 0 ..10 ) . map ( |num| format ! ( "link.{num}" ) ) ;
67+ let links = ( 0 ..links ) . map ( |num| format ! ( "link.{num}" ) ) ;
6768 let node = |name| Reflection {
6869 name,
6970 size : file_size,
@@ -81,7 +82,8 @@ fn deduplicate_multiple_hardlinks_to_a_single_file() {
8182
8283#[ test]
8384fn do_not_deduplicate_multiple_hardlinks_to_a_single_file ( ) {
84- let workspace = SampleWorkspace :: multiple_hardlinks_to_a_single_file ( ) ;
85+ let links = 10 ;
86+ let workspace = SampleWorkspace :: multiple_hardlinks_to_a_single_file ( 100_000 , links) ;
8587
8688 let json = Command :: new ( PDU )
8789 . with_current_dir ( & workspace)
@@ -102,7 +104,7 @@ fn do_not_deduplicate_multiple_hardlinks_to_a_single_file() {
102104 let expected_size = workspace
103105 . join ( "file.txt" )
104106 . pipe_as_ref ( read_apparent_size)
105- . mul ( 11 )
107+ . mul ( links + 1 )
106108 . add ( read_apparent_size ( & workspace) )
107109 . pipe ( Bytes :: new) ;
108110
0 commit comments