mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
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:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user