From dbaa6a0e13b66ebd7cb0a622db55471f63da3d2f Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Fri, 21 Jul 2017 12:45:13 +0200 Subject: [PATCH] Fix intermittent test failures due to accidentally reused class instance between threads (#4287) --- spec/services/resolve_remote_account_service_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/services/resolve_remote_account_service_spec.rb b/spec/services/resolve_remote_account_service_spec.rb index ab5d3c6e..c3b902b3 100644 --- a/spec/services/resolve_remote_account_service_spec.rb +++ b/spec/services/resolve_remote_account_service_spec.rb @@ -78,7 +78,7 @@ RSpec.describe ResolveRemoteAccountService do Thread.new do true while wait_for_start begin - return_values << subject.call('foo@localdomain.com') + return_values << ResolveRemoteAccountService.new.call('foo@localdomain.com') rescue ActiveRecord::RecordNotUnique fail_occurred = true end