Skip to content

Commit

Permalink
Fix flaky endpoint discovery cache test
Browse files Browse the repository at this point in the history
  • Loading branch information
alextwoods committed Aug 26, 2024
1 parent 9d284b6 commit 29a7f77
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,12 @@ module Plugins
]
}
)
cache_thread_block = nil
allow(Thread).to receive(:new) do |&block|
cache_thread_block = block
end
c.operation_not_required(foo: 'foo')
sleep(0.1)
cache_thread_block.call
expect(c.api_requests.size).to eq(3)
c.operation_not_required(foo: 'foo')
expect(c.api_requests.size).to eq(4)
Expand Down

0 comments on commit 29a7f77

Please sign in to comment.