0
0
Fork 0

Move RSpec config for streaming/search managers to be near classes (#27761)

This commit is contained in:
Matt Jankowski 2023-11-08 08:04:17 -05:00 committed by GitHub
parent ce91d14d48
commit b05575e242
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 64 additions and 31 deletions

View file

@ -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