Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorAndreas Brandl <abrandl@gitlab.com>2019-06-27 15:36:00 +0300
committerAndreas Brandl <abrandl@gitlab.com>2019-06-27 15:36:00 +0300
commit5c4d0dc69be52c7cb2a24ee7fe13c96c621994ea (patch)
tree4c56437e1671025a52fd9d0e09a0cbc4dca75004 /spec
parent47089be063b754b3cc76c47bda7d26876889e5de (diff)
parentd092ed178fe490769f60df2e1ce8a667b812fc79 (diff)
Merge branch 'sh-handle-nil-replication-lag' into 'master'
Fix background migrations failing with unused replication slot Closes #63666 See merge request gitlab-org/gitlab-ce!30042
Diffstat (limited to 'spec')
-rw-r--r--spec/models/postgresql/replication_slot_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/models/postgresql/replication_slot_spec.rb b/spec/models/postgresql/replication_slot_spec.rb
index e100af7ddc7..95ae204a8a8 100644
--- a/spec/models/postgresql/replication_slot_spec.rb
+++ b/spec/models/postgresql/replication_slot_spec.rb
@@ -47,5 +47,13 @@ describe Postgresql::ReplicationSlot, :postgresql do
expect(described_class.lag_too_great?).to eq(false)
end
+
+ it 'returns false when there is a nil replication lag' do
+ expect(described_class)
+ .to receive(:pluck)
+ .and_return([0.megabytes, nil])
+
+ expect(described_class.lag_too_great?).to eq(false)
+ end
end
end