Do not run app.executor callbacks in integration tests

This reverts changes made to integration tests in PR #23807.
The issue happens when using capybara with a driver that needs to start a
server in a separate thread like (poltergeist, selenium, etc).
Both threads the capybara server one and the test thread end running
syncronize over the interlock.
上级 4f21ac7e
...@@ -455,24 +455,17 @@ module Runner ...@@ -455,24 +455,17 @@ module Runner
def before_setup # :nodoc: def before_setup # :nodoc:
@app = nil @app = nil
@integration_session = nil @integration_session = nil
@execution_context = nil
super
end
def after_teardown # :nodoc:
remove!
super super
end end
def integration_session def integration_session
@integration_session ||= create_session(app).tap { @execution_context = app.respond_to?(:executor) && app.executor.run! } @integration_session ||= create_session(app)
end end
# Reset the current session. This is useful for testing multiple sessions # Reset the current session. This is useful for testing multiple sessions
# in a single test case. # in a single test case.
def reset! def reset!
remove! @integration_session = create_session(app)
integration_session
end end
def create_session(app) def create_session(app)
...@@ -488,8 +481,6 @@ def create_session(app) ...@@ -488,8 +481,6 @@ def create_session(app)
end end
def remove! # :nodoc: def remove! # :nodoc:
@execution_context.complete! if @execution_context
@execution_context = nil
@integration_session = nil @integration_session = nil
end end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册