Skip to content

Commit

Permalink
(#2) passing test++
Browse files Browse the repository at this point in the history
  • Loading branch information
henricasanova committed Oct 5, 2019
1 parent 7784d57 commit 71e1409
Showing 1 changed file with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -951,13 +951,14 @@ class SimpleStorageServiceSynchronousFileCopyFailuresTestWMS : public wrench::WM

// Do the file copy for a file that's not there

// First delete the file (we used to have an "already there" error)

// First delete the file on the 1000 storage service
wrench::StorageService::deleteFile(this->test->file_500, wrench::FileLocation::LOCATION(this->test->storage_service_1000));

try {
data_movement_manager->doSynchronousFileCopy(this->test->file_500,
wrench::FileLocation::LOCATION(this->test->storage_service_510),
wrench::FileLocation::LOCATION(this->test->storage_service_1000));
wrench::FileLocation::LOCATION(this->test->storage_service_1000),
wrench::FileLocation::LOCATION(this->test->storage_service_510));
throw std::runtime_error("Should have gotten a 'file not found' exception");
} catch (wrench::WorkflowExecutionException &e) {
// Check Exception
Expand All @@ -971,13 +972,13 @@ class SimpleStorageServiceSynchronousFileCopyFailuresTestWMS : public wrench::WM
throw std::runtime_error(
"Got the expected 'file not found' exception, but the failure cause does not point to the correct file");
}
if (cause->getLocation()->getStorageService() != this->test->storage_service_510) {
if (cause->getLocation()->getStorageService() != this->test->storage_service_1000) {
throw std::runtime_error(
"Got the expected 'file not found' exception, but the failure cause does not point to the correct storage service");
}
}

// Do the file copy from a dst storage service that's down
// Do the file copy from a src storage service that's down
this->test->storage_service_1000->stop();

try {
Expand All @@ -1000,12 +1001,13 @@ class SimpleStorageServiceSynchronousFileCopyFailuresTestWMS : public wrench::WM
}
}

// Do the file copy from a src storage service that's down

// Do the file copy to a dst storage service that's down
this->test->storage_service_510->stop();

try {
data_movement_manager->doSynchronousFileCopy(this->test->file_500,
wrench::FileLocation::LOCATION(this->test->storage_service_1000),
data_movement_manager->doSynchronousFileCopy(this->test->file_1,
wrench::FileLocation::LOCATION(this->test->storage_service_100),
wrench::FileLocation::LOCATION(this->test->storage_service_510));
throw std::runtime_error("Should have gotten a 'service is down' exception");
} catch (wrench::WorkflowExecutionException &e) {
Expand Down

0 comments on commit 71e1409

Please sign in to comment.