##// END OF EJS Templates
scm: git: performance improvements in fetching revisions (#8857, #9472)...
scm: git: performance improvements in fetching revisions (#8857, #9472) Parse a revision for a given branch, just if we haven't parsed it for any branches before. Moved the db check to for existing revisions into a grouped search. Search for many revisions at once: this reduces db load. Revisions are grouped into sets of 100. This is to improve memory consumption. There will be just one query instead of each 100. The above two methods significantly increase parsing speed. Test case was a git repo with 6000+ commits on a master branch, and several other branches originating for master. Speed improved from 1.4h to 18min. Contributed by Gergely Fábián. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9144 e93f8b46-1217-0410-a6f0-8f06a7374b81

File last commit:

r7398:233bdd777915
r9024:999a4ba30d7b
Show More
token_authentication_test.rb
33 lines | 853 B | text/x-ruby | RubyLexer
/ test / integration / api_test / token_authentication_test.rb
Jean-Baptiste Barth
Use absolute paths in test/**/* requires for Ruby 1.9.2 compatibility. #4050...
r4395 require File.expand_path('../../../test_helper', __FILE__)
Eric Davis
Allow authenticating with an API token via XML or JSON. (#3920)...
r3104
Eric Davis
Move all API tests into the ApiTest module to make management easier...
r4243 class ApiTest::TokenAuthenticationTest < ActionController::IntegrationTest
Toshi MARUYAMA
Rails3: replace "all" fixtures at test/integration/api_test/token_authentication_test.rb...
r7398 fixtures :projects, :trackers, :issue_statuses, :issues,
:enumerations, :users, :issue_categories,
:projects_trackers,
:roles,
:member_roles,
:members,
:enabled_modules,
:workflows
Eric Davis
Allow authenticating with an API token via XML or JSON. (#3920)...
r3104
Eric Davis
Added support for HTTP Basic access to the API. (#3920)...
r3105 def setup
Eric Davis
Added an Admin setting to enable/disable the REST web service. (#3920)...
r3106 Setting.rest_api_enabled = '1'
Eric Davis
Added support for HTTP Basic access to the API. (#3920)...
r3105 Setting.login_required = '1'
end
def teardown
Eric Davis
Added an Admin setting to enable/disable the REST web service. (#3920)...
r3106 Setting.rest_api_enabled = '0'
Eric Davis
Added support for HTTP Basic access to the API. (#3920)...
r3105 Setting.login_required = '0'
end
Toshi MARUYAMA
remove trailing white-spaces from test/integration/api_test/token_authentication_test.rb....
r6551
Eric Davis
Allow authenticating with an API token via XML or JSON. (#3920)...
r3104 # Using the NewsController because it's a simple API.
Eric Davis
Added support for HTTP Basic access to the API. (#3920)...
r3105 context "get /news" do
Eric Davis
Allow authenticating with an API token via XML or JSON. (#3920)...
r3104 context "in :xml format" do
Eric Davis
Refactor: convert api key tests to shoulda macros for reuse. #6447...
r4244 should_allow_key_based_auth(:get, "/news.xml")
Eric Davis
Allow authenticating with an API token via XML or JSON. (#3920)...
r3104 end
context "in :json format" do
Eric Davis
Refactor: convert api key tests to shoulda macros for reuse. #6447...
r4244 should_allow_key_based_auth(:get, "/news.json")
Eric Davis
Allow authenticating with an API token via XML or JSON. (#3920)...
r3104 end
end
end