diff --git a/test/concat_wu b/test/concat_wu
index 39f2005d54..26b47ec3cd 100644
--- a/test/concat_wu
+++ b/test/concat_wu
@@ -1,11 +1,11 @@
-
+ 0/
-
+ /
diff --git a/test/test.inc b/test/test.inc
index 3bb4c94983..80fb98621d 100644
--- a/test/test.inc
+++ b/test/test.inc
@@ -388,12 +388,11 @@ class Project {
echo "\nsleeping for $time seconds";
PassThru("sleep $time");
}
- PassThru("cp $source_dir/sched/cgi $
-this->project_dir/cgi/file_upload_handler$handler_num");
+ PassThru("cp $source_dir/sched/file_upload_handler $this->project_dir/cgi/file_upload_handler$handler_num");
}
//blocks until a file_upload_handler is running in the system, kills it and returns
- function kill_file_upload_hanlder()
+ function kill_file_upload_handler()
{
while(true)
{
diff --git a/test/test_download_backoff.php b/test/test_download_backoff.php
index 4f45a585f2..de8efad84c 100644
--- a/test/test_download_backoff.php
+++ b/test/test_download_backoff.php
@@ -52,6 +52,6 @@
$result->stderr_out = "APP: upper_case: starting, argc 1";
$result->exit_status = 0;
$project->check_results(2, $result);
- $project->compare_file("uc_multiple_download_wu_0_0", "uc_correct_output");
- $project->compare_file("uc_multiple_download_wu_1_0", "uc_correct_output");
+ $project->compare_file("uc_wu_0_0", "uc_correct_output");
+ $project->compare_file("uc_wu_1_0", "uc_correct_output");
?>
diff --git a/test/test_mdownload_backoff.php b/test/test_mdownload_backoff.php
new file mode 100644
index 0000000000..9e9951881b
--- /dev/null
+++ b/test/test_mdownload_backoff.php
@@ -0,0 +1,58 @@
+#! /usr/local/bin/php
+add_app($core_app);
+ $project->add_app_version($core_app_version);
+
+ $project->add_user($user);
+ $project->add_app($app);
+ $project->add_app_version($app_version);
+
+ $project->install(); // must install projects before adding to hosts
+
+ $host->log_flags = "log_flags.xml";
+ $host->add_project($project);
+ $host->install();
+
+ echo "adding work\n";
+
+ $work = new Work($app);
+ $work->wu_template = "uc_multiple_download_wu";
+ $work->result_template = "uc_result";
+ $work->nresults = 2;
+ $work->delay_bound = 10;
+ array_push($work->input_files, "input");
+ $work->install($project);
+
+ $project->start_feeder();
+ //delete the download_dir0 immediately
+ $project->delete_downloaddir(null, 0);
+ $project->delete_downloaddir(null, 1);
+ $project->delete_downloaddir(null, 2);
+
+ $pid = $host->run_asynch("-exit_when_idle");
+ $status = 0;
+ //wait until the host has stopped running
+ pcntl_waitpid($pid,$status,0);
+ $project->stop();
+
+ $result->state = RESULT_STATE_DONE;
+ $result->stderr_out = "APP: upper_case: starting, argc 1";
+ $result->exit_status = 0;
+ $project->check_results(2, $result);
+ $project->compare_file("uc_multiple_download_wu_0_0", "uc_correct_output");
+ $project->compare_file("uc_multiple_download_wu_1_0", "uc_correct_output");
+?>
diff --git a/test/test_upload_backoff.php b/test/test_upload_backoff.php
new file mode 100644
index 0000000000..8d9225aec1
--- /dev/null
+++ b/test/test_upload_backoff.php
@@ -0,0 +1,58 @@
+#! /usr/local/bin/php
+add_app($core_app);
+ $project->add_app_version($core_app_version);
+
+ $project->add_user($user);
+ $project->add_app($app);
+ $project->add_app_version($app_version);
+
+ $project->install(); // must install projects before adding to hosts
+
+ $host->log_flags = "log_flags.xml";
+ $host->add_project($project);
+ $host->install();
+
+ echo "adding work\n";
+
+ $work = new Work($app);
+ $work->wu_template = "uc_wu";
+ $work->result_template = "uc_result";
+ $work->nresults = 2;
+ $work->delay_bound = 10;
+ array_push($work->input_files, "input");
+ $work->install($project);
+
+ $project->start_feeder();
+ //delete the download_dir immediately
+ $project->remove_file_upload_handler()
+ $pid = $host->run_asynch("-exit_when_idle");
+
+ //reinstall download_dir after 100 seconds
+ $project->reinstall_file_upload_handler(20,null);
+ $status = 0;
+ //wait until the host has stopped running
+ pcntl_waitpid($pid,$status,0);
+ $project->stop();
+
+ $result->state = RESULT_STATE_DONE;
+ $result->stderr_out = "APP: upper_case: starting, argc 1";
+ $result->exit_status = 0;
+ $project->check_results(2, $result);
+ $project->compare_file("uc_wu_0_0", "uc_correct_output");
+ $project->compare_file("uc_wu_1_0", "uc_correct_output");
+?>