diff options
author | Mayra Cabrera <mcabrera@gitlab.com> | 2019-08-01 15:27:12 +0000 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2019-08-01 15:27:12 +0000 |
commit | 52767ae18d42e98f203faa3927ceada088c2dcd6 (patch) | |
tree | 0c00966c50f1a74c369b6dfd1f3052fb9e2ba07e /spec/models/namespace | |
parent | c017dc578dc78729050792d22b449ce0529479cf (diff) | |
download | gitlab-ce-52767ae18d42e98f203faa3927ceada088c2dcd6.tar.gz |
Hardcodes namespaces lease timing value to 1.5h
After measuring the response and performance of the workers on
https://gitlab.com/gitlab-org/gitlab-ce/issues/64092, we've decided 1.5
is fine for now. The time can be decreased later in the future when
enforcing the quota limits
Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/64092
Diffstat (limited to 'spec/models/namespace')
-rw-r--r-- | spec/models/namespace/aggregation_schedule_spec.rb | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/spec/models/namespace/aggregation_schedule_spec.rb b/spec/models/namespace/aggregation_schedule_spec.rb index 0f1283717e0..38bf8089411 100644 --- a/spec/models/namespace/aggregation_schedule_spec.rb +++ b/spec/models/namespace/aggregation_schedule_spec.rb @@ -7,24 +7,6 @@ RSpec.describe Namespace::AggregationSchedule, :clean_gitlab_redis_shared_state, it { is_expected.to belong_to :namespace } - describe '.delay_timeout' do - context 'when timeout is set on redis' do - it 'uses personalized timeout' do - Gitlab::Redis::SharedState.with do |redis| - redis.set(described_class::REDIS_SHARED_KEY, 1.hour) - end - - expect(described_class.delay_timeout).to eq(1.hour) - end - end - - context 'when timeout is not set on redis' do - it 'uses default timeout' do - expect(described_class.delay_timeout).to eq(3.hours) - end - end - end - describe '#schedule_root_storage_statistics' do let(:namespace) { create(:namespace) } let(:aggregation_schedule) { namespace.build_aggregation_schedule } @@ -87,21 +69,5 @@ RSpec.describe Namespace::AggregationSchedule, :clean_gitlab_redis_shared_state, aggregation_schedule.schedule_root_storage_statistics end end - - context 'with a personalized lease timeout' do - before do - Gitlab::Redis::SharedState.with do |redis| - redis.set(described_class::REDIS_SHARED_KEY, 1.hour) - end - end - - it 'uses a personalized time' do - expect(Namespaces::RootStatisticsWorker) - .to receive(:perform_in) - .with(1.hour, aggregation_schedule.namespace_id) - - aggregation_schedule.save! - end - end end end |