Skip to content

Commit

Permalink
fixed outdated newly added tests
Browse files Browse the repository at this point in the history
Signed-off-by: Xin Zhuang <stevenzzz@google.com>
  • Loading branch information
stevenzzzz committed Aug 13, 2018
1 parent aba9552 commit dafea16
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/common/upstream/cluster_manager_impl_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1953,17 +1953,17 @@ TEST_F(ClusterManagerImplTest, MergedUpdatesDestroyedOnUpdate) {
// The first update should be applied immediately, since it's not mergeable.
hosts_removed.push_back((*hosts)[0]);
cluster.prioritySet().hostSetsPerPriority()[0]->updateHosts(
hosts, hosts, hosts_per_locality, hosts_per_locality, {}, hosts_added, hosts_removed);
hosts, hosts, hosts_per_locality, hosts_per_locality, {}, hosts_added, hosts_removed, absl::nullopt);
EXPECT_EQ(1, factory_.stats_.counter("cluster_manager.cluster_updated").value());
EXPECT_EQ(0, factory_.stats_.counter("cluster_manager.cluster_updated_via_merge").value());
EXPECT_EQ(0, factory_.stats_.counter("cluster_manager.update_merge_cancelled").value());

// These calls should be merged, since there are no added/removed hosts.
hosts_removed.clear();
cluster.prioritySet().hostSetsPerPriority()[0]->updateHosts(
hosts, hosts, hosts_per_locality, hosts_per_locality, {}, hosts_added, hosts_removed);
hosts, hosts, hosts_per_locality, hosts_per_locality, {}, hosts_added, hosts_removed, absl::nullopt);
cluster.prioritySet().hostSetsPerPriority()[0]->updateHosts(
hosts, hosts, hosts_per_locality, hosts_per_locality, {}, hosts_added, hosts_removed);
hosts, hosts, hosts_per_locality, hosts_per_locality, {}, hosts_added, hosts_removed, absl::nullopt);
EXPECT_EQ(1, factory_.stats_.counter("cluster_manager.cluster_updated").value());
EXPECT_EQ(0, factory_.stats_.counter("cluster_manager.cluster_updated_via_merge").value());
EXPECT_EQ(0, factory_.stats_.counter("cluster_manager.update_merge_cancelled").value());
Expand Down

0 comments on commit dafea16

Please sign in to comment.