diff --git a/qiita_client/plugin.py b/qiita_client/plugin.py index 3af462e..7ee87b4 100644 --- a/qiita_client/plugin.py +++ b/qiita_client/plugin.py @@ -188,7 +188,8 @@ def _register_command(self, command): command: QiitaCommand The command to be added to the plugin """ - logger.debug('Entered BaseQiitaPlugin._register_command()') + logger.debug( + f'Entered BaseQiitaPlugin._register_command({command.name})') self.task_dict[command.name] = command def _register(self, qclient): diff --git a/qiita_client/qiita_client.py b/qiita_client/qiita_client.py index 2dca728..553fae8 100644 --- a/qiita_client/qiita_client.py +++ b/qiita_client/qiita_client.py @@ -31,9 +31,9 @@ # if the log level is not CRITICAL, the default, then we not expect slow # responses from the server so let's make the retries values small if logger.level != logging.CRITICAL: - MAX_RETRIES = 2 - MIN_TIME_SLEEP = 2 - MAX_TIME_SLEEP = 5 + MAX_RETRIES = 1 + MIN_TIME_SLEEP = 6 + MAX_TIME_SLEEP = 12 else: MAX_RETRIES = 3 MIN_TIME_SLEEP = 180 diff --git a/qiita_client/testing.py b/qiita_client/testing.py index da55598..41b183c 100644 --- a/qiita_client/testing.py +++ b/qiita_client/testing.py @@ -25,12 +25,13 @@ def setUpClass(cls): cls.client_id = '19ndkO3oMKsoChjVVWluF7QkxHRfYhTKSFbAVt8IhK7gZgDaO4' cls.client_secret = ('J7FfQ7CQdOxuKhQAf1eoGgBAE81Ns8Gu3EKaWFm3IO2JKh' 'AmmCWZuabe0O5Mp28s1') + # qiita_port needs to be the main worker in qiita, the default is 21174 + qiita_port = environ.get('QIITA_PORT', '21174') cls.ca_cert = environ.get('QIITA_ROOTCA_CERT') - # do not rely on defining ca_cert for these tests. Instead append - # the appropriate CA cert to certifi's pem file. + url = URL.replace('8383', qiita_port) cls.qclient = QiitaClient( - URL, cls.client_id, cls.client_secret, cls.ca_cert) + url, cls.client_id, cls.client_secret, cls.ca_cert) logger.debug( 'PluginTestCase.setUpClass() token %s' % cls.qclient._token)