@@ -192,9 +192,10 @@ mod tests {
192192 fn test_install ( ) {
193193 // Setup the resource limits
194194 let mut rlimits = ResourceLimits :: default ( ) ;
195- let new_limit = 100 ;
196- rlimits. set_file_size ( new_limit) ;
197- rlimits. set_no_file ( new_limit) ;
195+ let new_file_size_limit = 2097151 ;
196+ let new_no_file_limit = 100 ;
197+ rlimits. set_file_size ( new_file_size_limit) ;
198+ rlimits. set_no_file ( new_no_file_limit) ;
198199
199200 // Install the new limits to file size and
200201 // the number of file descriptors
@@ -207,8 +208,8 @@ mod tests {
207208 rlim_max : 0 ,
208209 } ;
209210 unsafe { libc:: getrlimit ( file_size_resource. into ( ) , & mut file_size_limit) } ;
210- assert_eq ! ( file_size_limit. rlim_cur, new_limit ) ;
211- assert_eq ! ( file_size_limit. rlim_max, new_limit ) ;
211+ assert_eq ! ( file_size_limit. rlim_cur, new_file_size_limit ) ;
212+ assert_eq ! ( file_size_limit. rlim_max, new_file_size_limit ) ;
212213
213214 // Verify the new limit for the number of file descriptors
214215 let file_descriptor_resource = Resource :: RlimitNoFile ;
@@ -217,7 +218,7 @@ mod tests {
217218 rlim_max : 0 ,
218219 } ;
219220 unsafe { libc:: getrlimit ( file_descriptor_resource. into ( ) , & mut file_descriptor_limit) } ;
220- assert_eq ! ( file_descriptor_limit. rlim_cur, new_limit ) ;
221- assert_eq ! ( file_descriptor_limit. rlim_max, new_limit ) ;
221+ assert_eq ! ( file_descriptor_limit. rlim_cur, new_no_file_limit ) ;
222+ assert_eq ! ( file_descriptor_limit. rlim_max, new_no_file_limit ) ;
222223 }
223224}
0 commit comments