diff --git a/plenum/config.py b/plenum/config.py index 8f5ad003f6..377ca07073 100644 --- a/plenum/config.py +++ b/plenum/config.py @@ -149,7 +149,7 @@ # Log configuration -logRotationWhen = 'W' +logRotationWhen = 'W6' logRotationInterval = 1 logRotationBackupCount = 50 logRotationMaxBytes = 100 * 1024 * 1024 diff --git a/plenum/test/pool_transactions/helper.py b/plenum/test/pool_transactions/helper.py index d2ae536851..d2fe6f1f88 100644 --- a/plenum/test/pool_transactions/helper.py +++ b/plenum/test/pool_transactions/helper.py @@ -5,6 +5,7 @@ from indy.pool import refresh_pool_ledger from plenum.test.node_catchup.helper import waitNodeDataEquality, \ ensureClientConnectedToNodesAndPoolLedgerSame +from plenum.test.node_request.helper import sdk_ensure_pool_functional from stp_core.loop.looper import Looper from stp_core.types import HA from typing import Iterable, Union, Callable @@ -504,7 +505,8 @@ def update_node_data_and_reconnect(looper, txnPoolNodeSet, txnPoolNodeSet[idx] = restartedNode looper.run(checkNodesConnected(txnPoolNodeSet)) - sdk_pool_refresh(looper, sdk_pool_handle) + sdk_ensure_pool_functional(looper, txnPoolNodeSet, + steward_wallet, sdk_pool_handle) return restartedNode diff --git a/plenum/test/pool_transactions/test_nodes_data_changed.py b/plenum/test/pool_transactions/test_nodes_data_changed.py index 8fe25cf0e0..9687e96ab4 100644 --- a/plenum/test/pool_transactions/test_nodes_data_changed.py +++ b/plenum/test/pool_transactions/test_nodes_data_changed.py @@ -21,20 +21,6 @@ # reaches it -@pytest.fixture(scope="module") -def tconf(tconf): - old_retry_timeout_restricted = tconf.RETRY_TIMEOUT_RESTRICTED - old_retry_timeout_not_restricted = tconf.RETRY_TIMEOUT_NOT_RESTRICTED - - tconf.RETRY_TIMEOUT_RESTRICTED = 0.3 * old_retry_timeout_restricted - tconf.RETRY_TIMEOUT_NOT_RESTRICTED = 0.3 * old_retry_timeout_not_restricted - - yield tconf - - tconf.RETRY_TIMEOUT_RESTRICTED = old_retry_timeout_restricted - tconf.RETRY_TIMEOUT_NOT_RESTRICTED = old_retry_timeout_not_restricted - - def testNodePortCannotBeChangedByAnotherSteward(looper, txnPoolNodeSet, sdk_wallet_steward, sdk_pool_handle, diff --git a/plenum/test/script/test_change_non_primary_node_ha.py b/plenum/test/script/test_change_non_primary_node_ha.py index 152ad1b518..cb708be3c1 100644 --- a/plenum/test/script/test_change_non_primary_node_ha.py +++ b/plenum/test/script/test_change_non_primary_node_ha.py @@ -12,6 +12,7 @@ @pytest.mark.skipif('sys.platform == "win32"', reason='SOV-330') +@pytest.mark.skip(reason='IS-626') def testChangeNodeHaForNonPrimary(looper, txnPoolNodeSet, tdirWithClientPoolTxns, poolTxnData, poolTxnStewardNames, tconf, tdir, sdk_pool_handle, sdk_wallet_stewards): diff --git a/plenum/test/test_log_rotation.py b/plenum/test/test_log_rotation.py index af26d7a569..0d985982f9 100644 --- a/plenum/test/test_log_rotation.py +++ b/plenum/test/test_log_rotation.py @@ -7,12 +7,21 @@ from stp_core.common.logging.TimeAndSizeRotatingFileHandler \ import TimeAndSizeRotatingFileHandler +from stp_core.common.log import Logger @pytest.fixture(params=[False, True], ids=["plain", "compressed"]) def log_compression(request): return request.param +def test_default_log_rotation_config_is_correct(tdir_for_func): + logDirPath = tdir_for_func + logFile = os.path.join(logDirPath, "log") + logger = Logger() + + # Assert this doesn't fail + logger.enableFileLogging(logFile) + def test_time_log_rotation(tdir_for_func, log_compression): logDirPath = tdir_for_func diff --git a/stp_core/config.py b/stp_core/config.py index 843bb77533..f0e1050c3e 100644 --- a/stp_core/config.py +++ b/stp_core/config.py @@ -7,7 +7,7 @@ baseDir = os.getcwd() # Log configuration -logRotationWhen = 'W' +logRotationWhen = 'W6' logRotationInterval = 1 logRotationBackupCount = 50 logRotationMaxBytes = 100 * 1024 * 1024