@@ -41,7 +41,7 @@ const MAX_FAILED_ATTEMPTS_TEST_RANGE: Range<i32> = 2..15;
4141
4242#[ test]
4343fn when_file_does_not_exist_then_changes_are_monitored_after_it_is_created ( ) {
44- let mut file = TestFile :: with_unique_name ( ) ;
44+ let mut file = TestFile :: empty ( ) ;
4545 file. remove ( ) ;
4646
4747 let options = AuthMonitorOptions :: default ( ) ;
@@ -62,7 +62,7 @@ fn when_file_does_not_exist_then_changes_are_monitored_after_it_is_created() {
6262#[ test]
6363pub fn when_auth_failure_limit_is_reached_then_update_callback_is_invoked ( ) {
6464 for max_failed_attempts in MAX_FAILED_ATTEMPTS_TEST_RANGE {
65- let mut file = TestFile :: with_unique_name ( ) ;
65+ let mut file = TestFile :: not_empty ( ) ;
6666 let options = AuthMonitorOptions {
6767 max_failed_attempts,
6868 ..AuthMonitorOptions :: default ( )
@@ -88,7 +88,7 @@ pub fn when_auth_failure_limit_is_reached_then_update_callback_is_invoked() {
8888#[ test]
8989pub fn when_auth_failure_limit_is_reached_between_updates_then_next_update_invokes_callback ( ) {
9090 for max_failed_attempts in MAX_FAILED_ATTEMPTS_TEST_RANGE {
91- let mut file = TestFile :: with_unique_name ( ) ;
91+ let mut file = TestFile :: not_empty ( ) ;
9292 let options = AuthMonitorOptions {
9393 max_failed_attempts,
9494 ..AuthMonitorOptions :: default ( )
@@ -105,7 +105,7 @@ pub fn when_auth_failure_limit_is_reached_between_updates_then_next_update_invok
105105
106106#[ test]
107107pub fn when_reset_time_has_passed_then_reset_failed_attempt_counter ( ) {
108- let mut file = TestFile :: with_unique_name ( ) ;
108+ let mut file = TestFile :: not_empty ( ) ;
109109 let options = AuthMonitorOptions {
110110 reset_after_seconds : 5 ,
111111 ..AuthMonitorOptions :: default ( )
@@ -135,7 +135,7 @@ pub fn when_reset_time_has_passed_then_reset_failed_attempt_counter() {
135135
136136#[ test]
137137fn when_file_is_deleted_and_new_one_is_created_then_changes_are_still_monitored ( ) {
138- let mut file = TestFile :: with_unique_name ( ) ;
138+ let mut file = TestFile :: not_empty ( ) ;
139139 let options = AuthMonitorOptions :: default ( ) ;
140140 let mut test = AuthMonitorTest :: new ( file. path ( ) , options) ;
141141 file. remove ( ) ;
@@ -150,7 +150,7 @@ fn when_file_is_deleted_and_new_one_is_created_then_changes_are_still_monitored(
150150
151151#[ test]
152152fn when_file_is_renamed_and_new_one_is_created_then_changes_are_still_monitored ( ) {
153- let mut file = TestFile :: with_unique_name ( ) ;
153+ let mut file = TestFile :: not_empty ( ) ;
154154 let options = AuthMonitorOptions :: default ( ) ;
155155 let mut test = AuthMonitorTest :: new ( file. path ( ) , options) ;
156156
@@ -167,7 +167,7 @@ fn when_file_is_renamed_and_new_one_is_created_then_changes_are_still_monitored(
167167
168168#[ test]
169169fn when_file_is_truncated_then_changes_are_still_monitored ( ) {
170- let mut file = TestFile :: with_unique_name ( ) ;
170+ let mut file = TestFile :: not_empty ( ) ;
171171 file. write_other_messages ( 5 ) ;
172172
173173 let options = AuthMonitorOptions :: default ( ) ;
0 commit comments