Skip to content

Commit

Permalink
Partial-Bug: 1464016 Add hook via env to bgp_stress_test to set numbe…
Browse files Browse the repository at this point in the history
…r of events

bgp_stress_test_suite runs tests with either default number of events (50) or
higher. Have a way to change this from outside via env BGP_STRESS_TEST_NEVENTS.
If set to -1, only initial test setup is executed and no other events are
injected.

Change-Id: I84827aa3aba29b0da37647e469b33cb573e9ed0f
  • Loading branch information
ananth-at-camphor-networks committed Jul 6, 2015
1 parent 93630f3 commit 08839ed
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/bgp/test/bgp_stress_test.cc
Expand Up @@ -2710,6 +2710,11 @@ static void process_command_line_args(int argc, const char **argv) {

bool cmd_line_arg_set = false;

// Reinitialize number of events from an environment variable if set.
char *env = getenv("BGP_STRESS_TEST_NEVENTS");
if (env)
d_events_ = strtoll(env, NULL, 0);

// Declare the supported options.
options_description desc(

Expand Down

0 comments on commit 08839ed

Please sign in to comment.