Move RSpec config for streaming/search managers to be near classes (#27761)
This commit is contained in:
parent
ce91d14d48
commit
b05575e242
3 changed files with 64 additions and 31 deletions
|
@ -76,3 +76,32 @@ class StreamingServerManager
|
|||
@running_thread.join
|
||||
end
|
||||
end
|
||||
|
||||
RSpec.configure do |config|
|
||||
config.before :suite do
|
||||
if streaming_examples_present?
|
||||
# Compile assets
|
||||
Webpacker.compile
|
||||
|
||||
# Start the node streaming server
|
||||
streaming_server_manager.start(port: STREAMING_PORT)
|
||||
end
|
||||
end
|
||||
|
||||
config.after :suite do
|
||||
if streaming_examples_present?
|
||||
# Stop the node streaming server
|
||||
streaming_server_manager.stop
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def streaming_server_manager
|
||||
@streaming_server_manager ||= StreamingServerManager.new
|
||||
end
|
||||
|
||||
def streaming_examples_present?
|
||||
RUN_SYSTEM_SPECS
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue