Module std::rt::test

Tools for testing the runtime Tools for testing the runtime

Modules

darwin_fd_limit

Functions

cleanup_task

Use to cleanup tasks created for testing but not "run".

new_test_uv_sched
next_test_ip4

Get a unique IPv4 localhost:port pair starting at 9600

next_test_ip6

Get a unique IPv6 localhost:port pair starting at 9600

next_test_port

Get a port number, starting at 9600, for use in tests

run_in_mt_newsched_task

Create more than one scheduler and run a function in a task in one of the schedulers. The schedulers will stay alive until the function f returns.

run_in_newsched_task
run_in_newsched_task_core
spawntask

Test tasks will abort on failure instead of unwinding

spawntask_later

Create a new task and run it right now. Aborts on failure

spawntask_random
spawntask_thread

Spawn a new task in a new scheduler and return a thread handle.

spawntask_try
stress_factor

Get a constant that represents the number of times to repeat stress tests. Default 1.

with_test_task

Get a ~Task for testing purposes other than actually scheduling it.