Commits

Steven Peters  committed ffd9585

Wait an extra 1.5 seconds before reset during Sensor_TEST.UpdateAfterReset to illustrate regression of issue #236

  • Participants
  • Parent commits 7df9b68
  • Branches issue_236_regression

Comments (0)

Files changed (1)

File gazebo/sensors/Sensor_TEST.cc

   EXPECT_GT(static_cast<double>(hokuyoMsgCount),
               updateRate*now * 0.5);
 
+  // Wait another 1.5 seconds
+  for (i=0; i < 15; ++i)
+    common::Time::MSleep(100);
+
+  hokuyoMsgCount = g_hokuyoMsgCount;
+  now = world->GetSimTime().Double();
+
+  gzdbg << "counted " << hokuyoMsgCount << " messages in "
+        << now << " seconds\n";
+
+  // Expect at least 50% of specified update rate
+  EXPECT_GT(static_cast<double>(hokuyoMsgCount),
+              updateRate*now * 0.5);
+
   // Send reset world message
   transport::PublisherPtr worldControlPub =
     node->Advertise<msgs::WorldControl>("~/world_control");