moto icon indicating copy to clipboard operation
moto copied to clipboard

WIP: Remove microsleep

Open alsuren opened this issue 6 years ago • 1 comments

alsuren avatar Oct 26 '18 14:10 alsuren

Looks like Travis is failing

spulec avatar Dec 29 '18 00:12 spulec

Codecov Report

Merging #1903 (28ebb58) into master (2500aff) will increase coverage by 0.00%. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #1903   +/-   ##
=======================================
  Coverage   96.20%   96.20%           
=======================================
  Files         742      742           
  Lines       72654    72683   +29     
=======================================
+ Hits        69894    69923   +29     
  Misses       2760     2760           
Flag Coverage Δ
servertests 36.93% <100.00%> (+0.01%) :arrow_up:
unittests 96.14% <100.00%> (+<0.01%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
moto/sqs/models.py 96.94% <100.00%> (+0.03%) :arrow_up:
moto/ssm/models.py 94.98% <0.00%> (+0.12%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

codecov-commenter avatar Nov 05 '22 12:11 codecov-commenter

This PR had gotten pretty stale, but replacing the sleep() call with threading.Condition is the Right Thing to Do here. I brought this up-to-date with the latest on master, fixed a bug in the original implementation (which caused the Travis failure mentioned by @spulec), and added an explicit test case.

bpandola avatar Nov 05 '22 13:11 bpandola

Oh wow. I wrote this at a company that was in the middle of porting from rabbitmq to sqs, and needed to have something for testing in CI. We spotted the sleep because the tests got slower when we switched the SQS feature on, and the sleep was showing up when we ran it under a sampling profiler. I then forgot about it, because I wasn't even supposed to be on the team doing the port.

I don't think I know anyone who still works at this company. Hopefully they've not still got things pointed at that branch, because I just deleted it ;-).

alsuren avatar Nov 05 '22 13:11 alsuren

This is now part of moto >= 4.0.10.dev9

github-actions[bot] avatar Nov 05 '22 14:11 github-actions[bot]