test: noms de base PostgreSQL uniques entre tests parallèles - #92
Open
PhilippeVienne wants to merge 1 commit into
Open
PhilippeVienne wants to merge 1 commit into
PhilippeVienne wants to merge 1 commit into
Conversation
Plusieurs suites forment le nom de leur base de test avec la seule horloge
(`prefix_{nanos}`) : deux tests lancés dans la même nanoseconde se
heurtent sur `pg_database_datname_index` (« duplicate key »). Constaté sur
la CI de #91 (action_challenge, déjà corrigé) et en local sur
`db_guard::a_role_that_can_write_the_registry_is_refused_with_every_violation`.
Les douze fichiers restants ajoutent à l'horloge le pid du processus et un
compteur atomique local. Vérifié par trois exécutions complètes de
`cargo test -p ra-console -p ca-server` avec PostgreSQL, sans échec.
Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Les tests qui créent une base avec la seule horloge dans son nom peuvent se heurter sur
pg_database_datname_indexquand deux démarrent dans la même nanoseconde (vu sur la CI de #91 et en local surdb_guard). Douze fichiers de tests dera-consoleetca-serverajoutent le pid et un compteur atomique local au nom. Vérifié par trois exécutions complètes decargo test -p ra-console -p ca-serveravec PostgreSQL etcargo clippy --workspace --all-targets.