Skip to content

Commit fda905a

Browse files
authored
fix: exclude custom_logger from transport test-suite (#968)
1 parent 9f9436a commit fda905a

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

include/sentry.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1068,6 +1068,11 @@ typedef void (*sentry_logger_function_t)(
10681068
* Sets the sentry-native logger function.
10691069
*
10701070
* Used for logging debug events when the `debug` option is set to true.
1071+
*
1072+
* Note: Multiple threads may invoke your `func`. If you plan to mutate any data
1073+
* inside the `userdata` argument after initialization, you must ensure proper
1074+
* synchronization inside the logger function.
1075+
*
10711076
*/
10721077
SENTRY_API void sentry_options_set_logger(
10731078
sentry_options_t *opts, sentry_logger_function_t func, void *userdata);

tests/test_unit.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ def test_unit(cmake, unittest):
1414

1515
@pytest.mark.skipif(not has_http, reason="tests need http transport")
1616
def test_unit_transport(cmake, unittest):
17+
if unittest in ["custom_logger"]:
18+
pytest.skip("excluded from transport test-suite")
19+
1720
cwd = cmake(["sentry_test_unit"], {"SENTRY_BACKEND": "none"})
1821
env = dict(os.environ)
1922
run(cwd, "sentry_test_unit", ["--no-summary", unittest], check=True, env=env)

0 commit comments

Comments
 (0)