Skip to content

Commit

Permalink
Fix flaky endpoint discovery cache test (#3093)
Browse files Browse the repository at this point in the history
  • Loading branch information
alextwoods committed Aug 26, 2024
1 parent a8c1bbf commit 6610f5f
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 6610f5f

Please sign in to comment.