Skip to content

Commit

Permalink
test coverage for skipping backlog calculation unless subscription in…
Browse files Browse the repository at this point in the history
… replication state
  • Loading branch information
yrudman committed Sep 4, 2019
1 parent c6da438 commit 41119f5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions spec/models/pglogical_subscription_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -496,5 +496,12 @@

expect(described_class.first.backlog).to be nil
end

it 'does not attempt to calculate backlog and returns nil unless subscription status is "replicating"' do
allow(described_class).to receive(:status).and_return("down")

expect(remote_connection).not_to receive(:xlog_location)
expect(described_class.first.backlog).to be nil
end
end
end

0 comments on commit 41119f5

Please sign in to comment.