Flow pipeline testing framework
This page describes how to set up a workstation and configure low-level parameters for contributors who are improving Flow itself and running its integration test suite. If you're a pipeline author testing your code, see Testing (C++), Testing (Java), Testing (Go), and Testing (Python) — these pages include the launch parameters and techniques you need for pipeline tests.
Environment setup
The Flow test suite captures Flow process crashes and extracts backtraces from coredumps. For this to work, you must enable coredump collection on your machine:
# Temporary (it’s better to add this to ~/.bashrc).
ulimit -c unlimited
Also, add the process PID to the coredump filename:
# Temporary — valid until reboot:
sudo sysctl -w kernel.core_uses_pid=1
# Permanent:
echo "kernel.core_uses_pid=1" | sudo tee -a /etc/sysctl.conf
sudo sysctl -p
Without core_uses_pid=1, you might see odd behavior, such as extracting multiple backtraces from a single coredump.
Flow test parameters
In addition to the general parameters (see Testing (C++)), these parameters are useful when you’re working on Flow itself — they affect the framework’s internal behavior:
|
Parameter |
Default |
Values |
Action |
|
|
|
|
Write backtraces of threads and fibers from running Flow processes to disk when an unhandled |
|
|
Absolute path |
Use a fixed pipeline binary — for example, one built with a thread sanitizer. |
|
|
|
|
Controls whether backtraces are added to errors in the logs. |
Examples:
ya make -A --test-param ERROR_BACKTRACE_ENRICHER_LEVEL=enabled_for_all
ya make -A --test-param DUMP_BACKTRACES_IF_HANGS=1
Local cluster settings
FlowTestBase reads clusters from yt_cluster_info.json in the test output directory, preserving their order: the first cluster is primary, and the rest are replicas. A recipe without this file can provide one primary cluster through YT_PROXY and YT_PROXY_URL_ALIASING_CONFIG. YT_PROXY may name an alias in this dictionary or contain an address matching exactly one alias. An unknown or ambiguous address requires an unambiguous alias or the standard metadata file. Alias entries do not add test replicas.
When the file is present, YT_PROXY, if supplied, must resolve to its primary cluster address. Addresses for names present in both the file and the alias dictionary must agree; extra aliases are allowed. For local tests, the framework sets YT_USER=root and a test YT_TOKEN before creating clients and passes the test token explicitly. EXTERNAL_YT_CONFIG keeps its existing cluster and path semantics.