Skip to content

Commit

Permalink
- fix test_25 - destination directory was checked before temp file
Browse files Browse the repository at this point in the history
  was created -> added sleep
  • Loading branch information
pirat89 committed Jul 18, 2014
1 parent 3077717 commit 96f9887
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -588,10 +588,13 @@ test_25() {

test_26() {
set_title "Create temp file in chosen path"
filename=$( create_text_file 50000000)
filename=$( create_text_file 50000000) # 50 MB
mkdir $DTEST_DIR
( $zip -b $DTEST_DIR $TEST_DIR/archive $TEST_DIR/$filename ) &
pid=$!

# important - without sleep it's possible check dir before file is created
sleep 0.5
[ $( ls $DTEST_DIR | wc -l ) -eq 0 ] && {
log_error "Tempfile was not created in chosen directory."
kill -s SIGINT $pid
Expand Down

0 comments on commit 96f9887

Please sign in to comment.