fix testsuite: fix YDB startup scripts - #1306
Conversation
YDB fails to create the database when running tests, which causes goose migrations to fail. Added a time limit for YDB to start, after which the tests are run
| mon_port=pytestconfig.option.ydb_mon_port, | ||
| ic_port=pytestconfig.option.ydb_ic_port, | ||
| database=database, | ||
| wait_time=pytestconfig.option.ydb_wait_time, |
There was a problem hiding this comment.
Am I missing something, or is --ydb-wait-time ignored for a locally started YDB instance? With --ydb-host, _ydb_service does not start a container. Without it, this fixture falls back to service.get_service_settings(), which gets the timeout from TESTSUITE_YDB_WAIT_TIME instead of the CLI option.
There was a problem hiding this comment.
Am I missing something, or is
--ydb-wait-timeignored for a locally started YDB instance? With--ydb-host,_ydb_servicedoes not start a container. Without it, this fixture falls back toservice.get_service_settings(), which gets the timeout fromTESTSUITE_YDB_WAIT_TIMEinstead of the CLI option.
Fixed
| break | ||
| fi | ||
|
|
||
| if [ "$i" -eq "$YDB_WAIT_TIME" ]; then |
There was a problem hiding this comment.
Does this fail one polling interval too early? For example, with YDB_WAIT_TIME=1, it checks once and exists before sleep 1. With the default value of 30, the final check happens after about 29 seconds rather than after the full timeout.
There was a problem hiding this comment.
Does this fail one polling interval too early? For example, with
YDB_WAIT_TIME=1, it checks once and exists beforesleep 1. With the default value of30, the final check happens after about 29 seconds rather than after the full timeout.
Fixed
There was a problem hiding this comment.
Could we run the readiness check again after the final sleep before calling die?
For example, with YDB_WAIT_TIME=1, the script currently checks at t=0, sleeps for one second, and then fails without checking at t=1.
The timeout should only be reported if that final readiness check also fails.
There was a problem hiding this comment.
Could we run the readiness check again after the final
sleepbefore callingdie?For example, with
YDB_WAIT_TIME=1, the script currently checks att=0, sleeps for one second, and then fails without checking att=1.The timeout should only be reported if that final readiness check also fails.
Done. I fixed the verification order.
YDB fails to create the database when running tests, which causes goose migrations to fail. Added a time limit for YDB to start, after which the tests are run.
The migration database schema has also been replaced for the basic functional test.