Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## [Unreleased]
### Added
- Return back deprecated `rp_log_batch_payload_size` parameter for sake of backward compatibility, by @HardNorth

## [5.5.3]
### Added
- OAuth 2.0 Password Grant authentication, by @HardNorth
### Changed
- Client version updated to [5.6.7](https://github.com/reportportal/client-Python/releases/tag/5.6.7), by @HardNorth
Expand Down
13 changes: 13 additions & 0 deletions pytest_reportportal/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,23 @@ def __init__(self, pytest_config: Config) -> None:
self.rp_launch_description = self.find_option(pytest_config, "rp_launch_description")
self.rp_log_batch_size = int(self.find_option(pytest_config, "rp_log_batch_size"))
batch_payload_size_limit = self.find_option(pytest_config, "rp_log_batch_payload_limit")
batch_payload_size = self.find_option(pytest_config, "rp_log_batch_payload_size")
if batch_payload_size:
warnings.warn(
"Parameter `rp_log_batch_payload_size` is deprecated since 5.5.4 "
"and will be subject for removing in the next major version. Use `rp_log_batch_payload_limit` argument"
" instead.",
DeprecationWarning,
2,
)
if not batch_payload_size_limit:
batch_payload_size_limit = batch_payload_size

if batch_payload_size_limit:
self.rp_log_batch_payload_limit = int(batch_payload_size_limit)
else:
self.rp_log_batch_payload_limit = MAX_LOG_BATCH_PAYLOAD_SIZE

self.rp_log_level = get_actual_log_level(pytest_config, "rp_log_level")
self.rp_log_format = self.find_option(pytest_config, "rp_log_format")
self.rp_thread_logging = to_bool(self.find_option(pytest_config, "rp_thread_logging") or False)
Expand Down
6 changes: 4 additions & 2 deletions pytest_reportportal/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
from pytest import Item, Session
from reportportal_client import RP, RPLogHandler
from reportportal_client.errors import ResponseError
from reportportal_client.logs import MAX_LOG_BATCH_PAYLOAD_SIZE

from pytest_reportportal import LAUNCH_WAIT_TIMEOUT
from pytest_reportportal.config import AgentConfig
Expand Down Expand Up @@ -595,9 +594,12 @@ def add_shared_option(name, help_str, default=None, action="store"):
parser.addini("rp_log_batch_size", default="20", help="Size of batch log requests in async mode")
parser.addini(
"rp_log_batch_payload_limit",
default=str(MAX_LOG_BATCH_PAYLOAD_SIZE),
help="Maximum payload size in bytes of async batch log requests",
)
parser.addini(
"rp_log_batch_payload_size",
help="DEPRECATED: Maximum payload size in bytes of async batch log requests",
)
parser.addini("rp_ignore_attributes", type="args", help="Ignore specified pytest markers, i.e parametrize")
parser.addini(
"rp_is_skipped_an_issue", default=True, type="bool", help="Treat skipped tests as required investigation"
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

from setuptools import setup

__version__ = "5.5.3"
__version__ = "5.5.4"


def read_file(fname):
Expand Down
1 change: 1 addition & 0 deletions tests/unit/test_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ def test_pytest_addoption_adds_correct_ini_file_arguments():
"rp_tests_attributes",
"rp_log_batch_size",
"rp_log_batch_payload_limit",
"rp_log_batch_payload_size",
"rp_ignore_attributes",
"rp_is_skipped_an_issue",
"rp_hierarchy_code",
Expand Down