d522ecef8f0426e8323009094dee2fa04798ffc1 hiram Fri Sep 11 15:12:36 2026 -0700 add a regression test that was uncovered with v504 preview 1 build refs #38290 diff --git src/hg/hubApi/tests/findGenome.sh src/hg/hubApi/tests/findGenome.sh index 3564abbca85..3a8d0c038b4 100755 --- src/hg/hubApi/tests/findGenome.sh +++ src/hg/hubApi/tests/findGenome.sh @@ -57,30 +57,37 @@ "textPlusFilters|q=white%20rhino&browser=mustExist&status=latest&maxItemsOutput=3" # Edge cases "noResults|q=zyxwvutsrq&maxItemsOutput=5" "specialChars|q=C.%20elegans&maxItemsOutput=5" "numbersYear|q=2020&maxItemsOutput=5" # Performance test cases "largeResultSet|q=chromosome&maxItemsOutput=50" "complexSearch|q=+human%20+reference%20-mouse&category=reference&status=latest&maxItemsOutput=20" # Specific assembly searches "assemblyHg38|q=hg38&maxItemsOutput=3" "assemblyMm39|q=mm39&maxItemsOutput=3" "assemblyPrefix|q=GCA_*&maxItemsOutput=10" + + # Regression: an exact NCBI accession search must also find the UCSC + # db name it is aliased to (hg38's description cross-references this + # accession). A one-word "exact match" fast path that short-circuits + # on the primary key before the FULLTEXT search runs would return only + # GCF_000001405.40 and silently drop hg38 -- see findGenome.c history. + "assemblyAccessionAlias|q=GCF_000001405.40&browser=mayExist&maxItemsOutput=3" ) # Function to clear MySQL caches clearSqlCaches() { echo " Clearing SQL caches..." # Connect to MySQL and clear various caches hgsql -e " FLUSH QUERY CACHE; FLUSH TABLES; RESET QUERY CACHE; FLUSH STATUS; " hgcentraltest 2>/dev/null || { echo " Warning: Could not clear SQL caches (may need admin privileges)" }