Modify MBS to use a separate Kerberos context per thread so both threads can use the thread keyring to store the Kerberos cache

This commit includes the backport of the changes to `krb_login` in
https://pagure.io/koji/pull-request/1187. This change is required
for our separate threads to use a separate Kerberos context per thread.
This commit is contained in:
mprahl
2018-12-13 14:24:32 -05:00
parent e17fdbdb5a
commit 25122cb53e
8 changed files with 141 additions and 36 deletions

View File

@@ -121,7 +121,7 @@ class TestGetModulemdsFromUrsineContent:
def teardown_method(self, test_method):
clean_database()
@patch('koji.ClientSession')
@patch('module_build_service.builder.KojiModuleBuilder.KojiClientSession')
def test_return_empty_if_no_ursine_build_tag_is_found(self, ClientSession):
session = ClientSession.return_value
@@ -141,7 +141,7 @@ class TestGetModulemdsFromUrsineContent:
assert [] == modulemds
@patch.object(conf, 'koji_tag_prefixes', new=['module'])
@patch('koji.ClientSession')
@patch('module_build_service.builder.KojiModuleBuilder.KojiClientSession')
def test_get_modulemds(self, ClientSession):
session = ClientSession.return_value
@@ -246,7 +246,7 @@ class TestRecordStreamCollisionModules:
@patch.object(conf, 'base_module_names', new=['platform', 'project-platform'])
@patch('module_build_service.utils.ursine.get_modulemds_from_ursine_content')
@patch('module_build_service.resolver.GenericResolver.create')
@patch('koji.ClientSession')
@patch('module_build_service.builder.KojiModuleBuilder.KojiClientSession')
def test_add_collision_modules(self, ClientSession, resolver_create,
get_modulemds_from_ursine_content):
xmd = {