diff options
author | 2016-11-10 16:08:31 +0200 | |
---|---|---|
committer | 2016-11-10 16:08:31 +0200 | |
commit | e9b4c74dae5a79a6ad77f0f1328f90795e9cc421 (patch) | |
tree | 79dfd2d1c25f63c8cf0e05d6ba5fa17b011614fa | |
parent | a842c1ff4e894ef4750cec4bb1f3830a1de047b3 (diff) |
Fixed unit test isseus of calling is_stateless before initializing state
Signed-off-by: Ido Barnea <ibarnea@cisco.com>
-rwxr-xr-x | src/bp_gtest.cpp | 2 | ||||
-rwxr-xr-x | src/bp_sim.cpp | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/bp_gtest.cpp b/src/bp_gtest.cpp index ca514c88..11bd6235 100755 --- a/src/bp_gtest.cpp +++ b/src/bp_gtest.cpp @@ -196,7 +196,7 @@ public: ports[i]=lpg->GenerateOneSourcePort(); } } - + CGlobalInfo::m_options.m_run_mode = CParserOption::RUN_MODE_BATCH; lpt->start_generate_stateful(buf,CGlobalInfo::m_options.preview); lpt->m_node_gen.DumpHist(stdout); diff --git a/src/bp_sim.cpp b/src/bp_sim.cpp index 62e8d822..734fd1b0 100755 --- a/src/bp_sim.cpp +++ b/src/bp_sim.cpp @@ -4419,7 +4419,7 @@ void CFlowGenListPerThread::stop_stateless_simulation_file(){ } void CFlowGenListPerThread::start_stateless_daemon_simulation(){ - + CGlobalInfo::m_options.m_run_mode = CParserOption::RUN_MODE_INTERACTIVE; m_cur_time_sec = 0; /* if no pending CP messages - the core will simply be stuck forever */ @@ -4438,6 +4438,7 @@ bool CFlowGenListPerThread::set_stateless_next_node( CGenNodeStateless * cur_nod void CFlowGenListPerThread::start_stateless_daemon(CPreviewMode &preview){ + CGlobalInfo::m_options.m_run_mode = CParserOption::RUN_MODE_INTERACTIVE; m_cur_time_sec = 0; /* set per thread global info, for performance */ m_preview_mode = preview; |