Skip to content

Commit

Permalink
FI-2836: Fix double requests from suite endpoints (#505)
Browse files Browse the repository at this point in the history
* fix comparison

* remove logging statement
  • Loading branch information
Jammjammjamm authored Jun 17, 2024
1 parent 0a95ece commit 4b48919
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion lib/inferno/dsl/suite_endpoint.rb
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,6 @@ def add_persistence_callback # rubocop:disable Metrics/CyclomaticComplexity
uri.query = env['rack.request.query_string'] if env['rack.request.query_string'].present?
url = uri&.to_s
verb = env['REQUEST_METHOD']
logger.info('get body')
request_body = env['rack.input']
request_body.rewind if env['rack.input'].respond_to? :rewind
request_body = request_body.instance_of?(Puma::NullIO) ? nil : request_body.string
Expand Down
2 changes: 1 addition & 1 deletion lib/inferno/utils/middleware/request_logger.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def call(env)

# rack.after_reply is handled by puma, which doesn't process requests
# in unit tests, so we manually run them when in the test environment
env['rack.after_reply']&.each(&:call) if (ENV['APP_ENV'] = 'test')
env['rack.after_reply']&.each(&:call) if ENV['APP_ENV'] == 'test'

response
end
Expand Down

0 comments on commit 4b48919

Please sign in to comment.