FIX: load balanced servers do not share monotonic clock

This means then when a service is load balanced and you reach rate limits
there was a case where they counting was way off

also remove the stub from clock_gettime cause we need to be super careful with
it, so we should probably just stub by hand when needed
This commit is contained in:
Sam
2017-12-07 11:48:11 +11:00
parent 90a55d6f7c
commit 47c44356f8
2 changed files with 4 additions and 6 deletions

View File

@@ -203,7 +203,6 @@ def freeze_time(now = Time.now)
Time.stubs(:now).returns(time)
Date.stubs(:today).returns(datetime.to_date)
TrackTimeStub.stubs(:stubbed).returns(true)
Process.stubs(:clock_gettime).with(Process::CLOCK_MONOTONIC).returns(datetime.to_f)
if block_given?
begin
@@ -219,7 +218,6 @@ def unfreeze_time
Time.unstub(:now)
Date.unstub(:today)
TrackTimeStub.unstub(:stubbed)
Process.unstub(:clock_gettime)
end
def file_from_fixtures(filename, directory = "images")