Skip to content

Commit

Permalink
Fix test sample consensus under Windows in Debug
Browse files Browse the repository at this point in the history
The test compiles differntly if the configuration is Release or Debug. In Debug mode, threads are required to finish their task in 15 seconds instead of 1.

Closes 2585
  • Loading branch information
claudiofantacci authored and SergioRAgostinho committed Nov 4, 2018
1 parent 72338f7 commit 5239a48
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/sample_consensus/test_sample_consensus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,12 @@ TEST (SampleConsensus, InfiniteLoop)
cloud.points[idx].z = 0.0;
}

#if defined(DEBUG) || defined(_DEBUG)
boost::posix_time::time_duration delay (0, 0, 15, 0);
#else
boost::posix_time::time_duration delay (0, 0, 1, 0);
#endif

boost::function<bool ()> sac_function;
SampleConsensusModelSpherePtr model (new SampleConsensusModelSphere<PointXYZ> (cloud.makeShared ()));

Expand Down

0 comments on commit 5239a48

Please sign in to comment.