Fix 2 small bugs (#3573)

This commit is contained in:
Yuhong Guo
2018-12-18 14:52:21 -05:00
committed by Robert Nishihara
parent db0dee573e
commit 75ddf7cca4
3 changed files with 9 additions and 5 deletions
+4 -2
View File
@@ -29,7 +29,8 @@ class MockObjectDirectory : public ObjectDirectoryInterface {
const ObjectID object_id = callback.first;
auto it = locations_.find(object_id);
if (it == locations_.end()) {
callback.second(object_id, {}, /*created=*/false);
callback.second(object_id, std::unordered_set<ray::ClientID>(),
/*created=*/false);
} else {
callback.second(object_id, it->second, /*created=*/true);
}
@@ -254,7 +255,8 @@ TEST_F(ReconstructionPolicyTest, TestReconstructionEvicted) {
ASSERT_EQ(reconstructed_tasks_[task_id], 0);
// Simulate evicting one of the objects.
mock_object_directory_->SetObjectLocations(object_id, {});
mock_object_directory_->SetObjectLocations(object_id,
std::unordered_set<ray::ClientID>());
// Run the test again.
Run(reconstruction_timeout_ms_ * 1.1);
// Check that reconstruction was triggered, since one of the objects was