Skip to content

Commit 16226a4

Browse files
authored
chore(ci): wait for server in integration test runs after config restore (#3540)
The integration workflow can start policy-service BATS while the background OpenTDF server is still restarting after tdf-roundtrips restores opentdf.yaml. That leaves the next step racing a brief connection-refused window. This waits for the restored config to be picked up and the server health check to return before tdf-roundtrips exits, so the following BATS step starts against a ready server. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Tests** * Improved test suite stability by ensuring services are fully ready after restore: added a brief initialization pause, active health polling before continuing, and explicit failure if the service never becomes healthy. <!-- review_stack_entry_start --> [![Review Change Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/opentdf/platform/pull/3540?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack) <!-- review_stack_entry_end --> <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: jakedoublev <jake.vanvorhis@virtru.com>
1 parent e95fb70 commit 16226a4

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

test/tdf-roundtrips.bats

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,8 @@ wait_for_green() {
159159
fi
160160
sleep 4
161161
done
162+
echo "WARNING: service failed health check after sleep and polling" >&2
163+
return 1
162164
}
163165

164166
write_opentdf_config() {
@@ -357,5 +359,7 @@ teardown() {
357359
teardown_file() {
358360
if [ -f opentdf-test-backup.yaml.bak ]; then
359361
mv opentdf-test-backup.yaml.bak opentdf.yaml
362+
sleep 4
363+
wait_for_green
360364
fi
361365
}

0 commit comments

Comments
 (0)