Project

General

Profile

Bug #17362

Unittest failing when HTCondor is installed (condor bindings)

Added by Marco Mambelli over 2 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Normal
Category:
-
Target version:
Start date:
08/03/2017
Due date:
% Done:

0%

Estimated time:
First Occurred:
Occurs In:
Stakeholders:
Duration:

Description

GWMS code has been modified to prefer condor bindings when available.
Unit tests are mocking the functions invoking condor clients.

When running on a host w/ HTCondor python bindings installed the frontend and frontend_element unit tests were failing (the ones using condor).
This highlighted also a bug in the test_frontend.py where the logging was not mocked all the time (see below - part 1).
Using the condor binding in the test (not mocked) caused the condor communications to fail (see below - part 2).

======================================================================
ERROR [0.017s]: test_countCondorQ (__main__.FETestCaseCondorQ)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./test_frontend.py", line 315, in setUp
    super(FETestCaseCondorQ, self).setUp()
  File "./test_frontend.py", line 66, in setUp
    self.status_dict = glideinFrontendLib.getCondorStatus(['coll1'])
  File "/opt/gwms-git/glideinwms/frontend/glideinFrontendLib.py", line 620, in getCondorStatus
    return getCondorStatusConstrained(collector_names, type_constraint, constraint, format_list)
  File "/opt/gwms-git/glideinwms/frontend/glideinFrontendLib.py", line 1089, in getCondorStatusConstrained
    logSupport.log.exception(msg)
AttributeError: 'NoneType' object has no attribute 'exception'

Condor Error. Failed to talk to collector coll1:
E
======================================================================
ERROR [0.025s]: test_countCondorQ (__main__.FETestCaseCondorQ)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./test_frontend.py", line 327, in setUp
    super(FETestCaseCondorQ, self).setUp()
  File "./test_frontend.py", line 78, in setUp
    self.prepare_condorq_dict()
  File "./test_frontend.py", line 97, in prepare_condorq_dict
    cq.load()
  File "/opt/gwms-git/glideinwms/lib/condorMonitor.py", line 496, in load
    self.stored_data = self.fetch(constraint, format_list)
  File "/opt/gwms-git/glideinwms/lib/condorMonitor.py", line 536, in fetch
    format_list=format_list)
  File "/opt/gwms-git/glideinwms/lib/condorMonitor.py", line 430, in fetch
    format_list=format_list)
  File "/opt/gwms-git/glideinwms/lib/condorMonitor.py", line 560, in fetch_using_bindings
    self.schedd_name)
glideinwms.lib.condorMonitor.QueryError: Error executing htcondor query with constraint None and format_list None: Error querying schedd sched1 in pool pool1 using python bindings: Failed communication with collector.

History

#1 Updated by Marco Mambelli over 2 years ago

  • Status changed from New to Feedback
  • Assignee changed from Marco Mambelli to Parag Mhashilkar

Fix logging for all test and force condorMonitor not to use bindings, changes in v3/17362
Opened [#17363] covering more substantial changes on unit test

#2 Updated by Marco Mambelli over 2 years ago

  • Assignee changed from Parag Mhashilkar to Marco Mambelli

#3 Updated by Marco Mambelli over 2 years ago

  • Status changed from Feedback to Resolved

#4 Updated by Marco Mambelli about 2 years ago

  • Status changed from Resolved to Closed


Also available in: Atom PDF