Dduvall has submitted this change and it was merged.

Change subject: Cache authenticated API client by url and user
......................................................................


Cache authenticated API client by url and user

Change-Id: I0ebed8d23eac694a498afc2bc770f2d6e4c71906
---
M lib/mediawiki_selenium/support/modules/api_helper.rb
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Dduvall: Looks good to me, approved
  Zfilipin: Looks good to me, but someone else must approve



diff --git a/lib/mediawiki_selenium/support/modules/api_helper.rb 
b/lib/mediawiki_selenium/support/modules/api_helper.rb
index e630bf8..9ccc44a 100644
--- a/lib/mediawiki_selenium/support/modules/api_helper.rb
+++ b/lib/mediawiki_selenium/support/modules/api_helper.rb
@@ -14,7 +14,7 @@
 
       url = lookup(:mediawiki_api_url, default: 
api_url_from(lookup(:mediawiki_url)))
 
-      @api_cache[url] ||= MediawikiApi::Client.new(url).tap do |client|
+      @api_cache[[url, user]] ||= MediawikiApi::Client.new(url).tap do |client|
         client.log_in(user, password)
       end
     end

-- 
To view, visit https://gerrit.wikimedia.org/r/179362
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I0ebed8d23eac694a498afc2bc770f2d6e4c71906
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/selenium
Gerrit-Branch: env-abstraction-layer
Gerrit-Owner: Dduvall <[email protected]>
Gerrit-Reviewer: Cmcmahon <[email protected]>
Gerrit-Reviewer: Dduvall <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>
Gerrit-Reviewer: Zfilipin <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to