mirror of
https://github.com/kubernetes/kubernetes.git
synced 2026-02-14 16:25:09 -05:00
A "sync test" runs the test inside a testing/synctest bubble. Time moves forward in a deterministic fashion when all goroutines are blocked waiting for time to progress. This simplifies testing concurrent behavior. ktesting enables writing such tests with a new SyncTest method: it can start a new sub-test (similar to Run) or turn an existing test (typically a top-level Test<something>) into a sync test when no new name is given. TContext.IsSyncTest can be used to check the mode of the current test, which may be useful in common helper code. TContext.Wait directly maps to synctest.Wait. This new functionality is limited to tests which use an underlying testing.T instance. |
||
|---|---|---|
| .. | ||
| examples | ||
| initoption | ||
| internal | ||
| assert.go | ||
| assert_test.go | ||
| clientcontext.go | ||
| contexthelper.go | ||
| contexthelper_test.go | ||
| doc.go | ||
| errorcontext.go | ||
| errorcontext_test.go | ||
| helper_test.go | ||
| klogcontext.go | ||
| ktesting.go | ||
| main_test.go | ||
| signals.go | ||
| signals_non_win.go | ||
| signals_win.go | ||
| stepcontext.go | ||
| stepcontext_test.go | ||
| tcontext.go | ||
| tcontext_test.go | ||
| withcontext.go | ||