kubernetes/test/utils/ktesting
Patrick Ohly 4526b28606 ktesting: improve context message
This is not necessarily a problem, some code might use a timeout and expect it
to trigger. Therefore this should only be an info message, not a
warning. Long-term it might be useful to have an API where the caller decides
whether this gets logged.

The caller should use short messages and leave it to the user of those to
provide more context (no pun intended...). When logging, "canceling context" is
that context.

Before:

    scheduler_perf.go:1431: FATAL ERROR: op 7: delete scheduled pods: client rate limiter Wait returned an error: rate: Wait(n=1) would exceed context deadline
    contexthelper.go:69:
        WARNING: the operation ran for the configured 2s

After:

    scheduler_perf.go:1431: FATAL ERROR: op 7: delete scheduled pods: client rate limiter Wait returned an error: rate: Wait(n=1) would exceed context deadline
    contexthelper.go:69:
        INFO: canceling context: the operation ran for the configured 2s
2024-10-16 10:46:24 +02:00
..
examples ktesting: add TContext 2024-02-11 10:51:38 +01:00
initoption ktesting: support capturing log output 2024-06-26 08:11:31 +02:00
internal ktesting: support capturing log output 2024-06-26 08:11:31 +02:00
assert.go ktesting: doc updates and fixes 2024-02-25 18:13:58 +01:00
assert_test.go ktesting: improve unit test coverage 2024-02-22 12:04:42 +01:00
clientcontext.go ktesting: add TContext 2024-02-11 10:51:38 +01:00
contexthelper.go ktesting: improve context message 2024-10-16 10:46:24 +02:00
contexthelper_test.go ktesting: ut flake fix for CI 2024-02-26 07:26:20 -05:00
doc.go ktesting: add TContext 2024-02-11 10:51:38 +01:00
errorcontext.go ktesting: add missing methods to error context 2024-02-22 11:43:54 +01:00
errorcontext_test.go fix: enable and fixes rules from testifylint on test package 2024-06-30 05:44:47 +00:00
helper_test.go fix: enable and fixes rules from testifylint on test package 2024-06-30 05:44:47 +00:00
klogcontext.go ktesting: add TContext 2024-02-11 10:51:38 +01:00
ktesting.go test: use cancelation from ktesting 2024-03-01 07:51:22 +01:00
main_test.go ktesting: improve unit test coverage 2024-02-22 12:04:42 +01:00
signals.go ktesting: improve unit test coverage 2024-02-22 12:04:42 +01:00
signals_non_win.go ktesting: add TContext 2024-02-11 10:51:38 +01:00
signals_win.go ktesting: add TContext 2024-02-11 10:51:38 +01:00
stepcontext.go ktesting: add Step 2024-06-25 14:00:22 +02:00
stepcontext_test.go fix: enable and fixes rules from testifylint on test package 2024-06-30 05:44:47 +00:00
tcontext.go Merge pull request #125698 from pohly/dra-log-output 2024-06-26 12:01:03 -07:00
tcontext_test.go ktesting: improve unit test coverage 2024-02-22 12:04:42 +01:00
withcontext.go ktesting: add TContext 2024-02-11 10:51:38 +01:00