Changeset 983
- Timestamp:
- 02/22/07 18:38:32 (4 years ago)
- Files:
-
- trunk/daemon/daemon_test.rb (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/daemon/daemon_test.rb
r979 r983 277 277 use_options.update(options) if options 278 278 @dont_touch_again_files = [] 279 280 # Determine a random number of mutations to perform in this iteration 279 281 mutation_count = MIN_MUTATIONS_PER_ITERATION + rand(MAX_MUTATIONS_PER_ITERATION - MIN_MUTATIONS_PER_ITERATION) 282 283 # Output header for this iteration 280 284 puts ("-" * 72) 281 285 @iteration_count += 1 … … 286 290 end 287 291 puts "Doing #{mutation_count} mutations" 292 293 # Perform the mutations on the file system 288 294 1.upto(mutation_count) { mutate_tree(use_options) } 289 295 290 296 if not use_options[:replay] 291 297 puts "Waiting for daemon to update directory" 292 293 1.upto(4) do 298 299 # Wait one second so that the changes to the file system become 300 # "old enough" to get picked up by the file monitor. 301 sleep(1) 302 303 # We're looping through this twice because if we only pick up 304 # the current value of the last_update_finish_time and wait for 305 # it to change, we're actually only waiting for the *current* 306 # run to finish. But in the current run, the file monitor might 307 # have already walked past the changes (because they were not 308 # yet old enough.) Looping through this twice means that we wait 309 # for a new run to begin and for that run to finish, thereby 310 # ensuring that the changes get picked up. 311 1.upto(2) do 294 312 last_time_updated = Earth::Server.this_server.last_update_finish_time 295 313 begin … … 302 320 end until last_time_updated != Earth::Server.this_server.last_update_finish_time 303 321 end 322 304 323 puts "Verifying data integrity" 305 324 verify_data 306 325 puts "Integrity verified" 307 sleep 2.seconds 326 327 #sleep 2.seconds 308 328 end 309 329 end
