summaryrefslogtreecommitdiff
path: root/spec/models/project_services
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-08-15 23:26:40 +0200
committerKamil Trzcinski <ayufan@ayufan.eu>2016-08-15 23:26:40 +0200
commite8aab1cd1550dd14408ae4c7b51f45110898b949 (patch)
treeca058d53cbeff735fe3eb678299afddd8b4ed1ca /spec/models/project_services
parent804fa437581713608a714ae0a3912d44e0a1d026 (diff)
downloadgitlab-ce-e8aab1cd1550dd14408ae4c7b51f45110898b949.tar.gz
This fixes a long running tests due to changed Sidekiq statefix-failing-tests
Diffstat (limited to 'spec/models/project_services')
-rw-r--r--spec/models/project_services/irker_service_spec.rb21
1 files changed, 11 insertions, 10 deletions
diff --git a/spec/models/project_services/irker_service_spec.rb b/spec/models/project_services/irker_service_spec.rb
index b528baaf15c..a8f2d626477 100644
--- a/spec/models/project_services/irker_service_spec.rb
+++ b/spec/models/project_services/irker_service_spec.rb
@@ -52,19 +52,20 @@ describe IrkerService, models: true do
let(:colorize_messages) { '1' }
before do
+ @irker_server = TCPServer.new 'localhost', 0
+
allow(irker).to receive_messages(
- active: true,
- project: project,
- project_id: project.id,
- service_hook: true,
- server_host: 'localhost',
- server_port: 6659,
- default_irc_uri: 'irc://chat.freenode.net/',
- recipients: recipients,
- colorize_messages: colorize_messages)
+ active: true,
+ project: project,
+ project_id: project.id,
+ service_hook: true,
+ server_host: @irker_server.addr[2],
+ server_port: @irker_server.addr[1],
+ default_irc_uri: 'irc://chat.freenode.net/',
+ recipients: recipients,
+ colorize_messages: colorize_messages)
irker.valid?
- @irker_server = TCPServer.new 'localhost', 6659
end
after do