Skip to content

Commit

Permalink
Update instances_ when working with external control-node
Browse files Browse the repository at this point in the history
Found an issue with using bgp_stress_test against an external
control-node. Subscription and routes send did not happen
as expected

Change-Id: If71d669ba4c70f4f0d9e27dd11d5b8f8075f2269
Partial-Bug: 1464016
  • Loading branch information
ananth-at-camphor-networks committed Nov 6, 2015
1 parent 185eb67 commit 7ba8db8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bgp/test/bgp_stress_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2202,6 +2202,7 @@ void BgpStressTest::AddRoutingInstance(int instance_id, int ntargets) {

BGP_STRESS_TEST_EVENT_LOG(BgpStressTestEvent::ADD_ROUTING_INSTANCE);
instances_[instance_id] = true;
if (d_external_mode_) return;

if (instance_id) {
ostringstream out;
Expand All @@ -2222,7 +2223,6 @@ void BgpStressTest::AddRoutingInstance(vector<int> instance_ids, int ntargets) {
}

void BgpStressTest::AddRoutingInstances(int ninstances, int ntargets) {
if (d_external_mode_) return;
for (int instance_id = 0; instance_id <= ninstances; ++instance_id) {
if (instance_id < (int) instances_.size() && instances_[instance_id])
continue;
Expand Down

0 comments on commit 7ba8db8

Please sign in to comment.