@@ -108,6 +108,21 @@ test {
108108 }
109109
110110 jvmArgs = baseArgs
111+ // The HOT soak test (hot.soak.run) sustains thousands of mutating revisions + concurrent
112+ // readers; give its fork more heap. Normal test runs are unaffected.
113+ if (System . getProperty(' hot.soak.run' ) == ' true' ) {
114+ maxHeapSize = System . getProperty(' hot.soak.heap' , ' 8g' )
115+ systemProperty ' hot.soak.run' , ' true'
116+ [' hot.soak.perRev' , ' hot.soak.revs' , ' hot.soak.readers' , ' hot.soak.validateEvery' ,
117+ ' hot.soak.heap' , ' hot.soak.seed' , ' hot.soak.index' ,
118+ ' sirix.allocator.maxSize' ]. each { k -> if (System . getProperty(k) != null ) systemProperty k, System . getProperty(k) }
119+ // An OOM in a forked soak worker otherwise leaves the JVM hung indefinitely (the test
120+ // never returns, gradle waits forever). Exit immediately and capture a heap dump so the
121+ // run fails fast and the leak is diagnosable.
122+ jvmArgs + = [" -XX:+ExitOnOutOfMemoryError" ,
123+ " -XX:+HeapDumpOnOutOfMemoryError" ,
124+ " -XX:HeapDumpPath=${ System.getenv('TMPDIR') ?: '/tmp'} /soak-oom.hprof" ]
125+ }
111126 // Pass through diagnostic system properties
112127 systemProperty " sirix.debug.path.summary" , System . getProperty(" sirix.debug.path.summary" , " false" )
113128 systemProperty " sirix.debug.leak.diagnostics" , System . getProperty(" sirix.debug.leak.diagnostics" , " false" )
@@ -121,7 +136,43 @@ test {
121136 systemProperty " sirix.lz4.fast.decompress" , useFastLz4. toString()
122137 systemProperty " sirix.lz77Codec.native.disable" , System . getProperty(" sirix.lz77Codec.native.disable" , " false" )
123138 systemProperty " sirix.lz77Codec.diag.counters" , System . getProperty(" sirix.lz77Codec.diag.counters" , " false" )
124-
139+ // HOT trie flags still referenced in source — forward from Gradle CLI to test JVM.
140+ systemProperty " hot.strict.validate" , System . getProperty(" hot.strict.validate" , " false" )
141+ systemProperty " hot.strict.phase7u.lexprimary" , System . getProperty(" hot.strict.phase7u.lexprimary" , " false" )
142+ systemProperty " hot.strict.phase7u.lexfallback.disable" , System . getProperty(" hot.strict.phase7u.lexfallback.disable" , " false" )
143+ systemProperty " hot.bisect.i8" , System . getProperty(" hot.bisect.i8" , " false" )
144+ systemProperty " hot.bisect.from" , System . getProperty(" hot.bisect.from" , " 0" )
145+ systemProperty " hot.bisect.to" , System . getProperty(" hot.bisect.to" , " 600" )
146+ systemProperty " hot.dump.at" , System . getProperty(" hot.dump.at" , " -1" )
147+ systemProperty " hot.debug.phase4" , System . getProperty(" hot.debug.phase4" , " false" )
148+ systemProperty " hot.formal.verify" , System . getProperty(" hot.formal.verify" , " false" )
149+ systemProperty " hot.strict.phase5e" , System . getProperty(" hot.strict.phase5e" , " false" )
150+ systemProperty " hot.trace.persistent" , System . getProperty(" hot.trace.persistent" , " false" )
151+ systemProperty " hot.strict.phase7f" , System . getProperty(" hot.strict.phase7f" , " false" )
152+ systemProperty " hot.strict.phase7h" , System . getProperty(" hot.strict.phase7h" , " false" )
153+ systemProperty " hot.strict.phase7j" , System . getProperty(" hot.strict.phase7j" , " false" )
154+ systemProperty " hot.strict.phase7k" , System . getProperty(" hot.strict.phase7k" , " false" )
155+ systemProperty " hot.strict.phase7q.commitroot" , System . getProperty(" hot.strict.phase7q.commitroot" , " false" )
156+ systemProperty " hot.strict.phase7q.postcommit" , System . getProperty(" hot.strict.phase7q.postcommit" , " false" )
157+ systemProperty " hot.strict.phase7r.routeverify" , System . getProperty(" hot.strict.phase7r.routeverify" , " false" )
158+ systemProperty " hot.strict.phase7s.split" , System . getProperty(" hot.strict.phase7s.split" , " true" )
159+ systemProperty " hot.strict.phase7t.monotone.probe" , System . getProperty(" hot.strict.phase7t.monotone.probe" , " false" )
160+ systemProperty " hot.strict.phase7t.betamixed.probe" , System . getProperty(" hot.strict.phase7t.betamixed.probe" , " false" )
161+ systemProperty " hot.strict.phase7t.crossroute.probe" , System . getProperty(" hot.strict.phase7t.crossroute.probe" , " false" )
162+ systemProperty " hot.strict.phase7t.subsetroute.probe" , System . getProperty(" hot.strict.phase7t.subsetroute.probe" , " false" )
163+ systemProperty " hot.strict.phase7t.perkey.probe" , System . getProperty(" hot.strict.phase7t.perkey.probe" , " false" )
164+ systemProperty " hot.strict.phase7t10.perkey.probe" , System . getProperty(" hot.strict.phase7t10.perkey.probe" , " false" )
165+ systemProperty " hot.strict.phase7t11.perkey.probe" , System . getProperty(" hot.strict.phase7t11.perkey.probe" , " false" )
166+ systemProperty " hot.debug.i6trace" , System . getProperty(" hot.debug.i6trace" , " " )
167+ systemProperty " hot.diag.selfHealDetail" , System . getProperty(" hot.diag.selfHealDetail" , " false" )
168+ systemProperty " hot.diag.postHandlerValidate" , System . getProperty(" hot.diag.postHandlerValidate" , " false" )
169+ systemProperty " hot.diag.directionOneFallback" , System . getProperty(" hot.diag.directionOneFallback" , " false" )
170+ // Forward ALL hot.* system properties from the gradle JVM to the forked test JVM so that
171+ // ad-hoc -Dhot.diag.* debug flags reach the code under test without needing to whitelist each
172+ // one here (the individual entries above are kept for clarity / defaults but are redundant
173+ // with this pattern). Mirrors the root build.gradle's sirix.* forwarding.
174+ System . properties. findAll { it. key. startsWith(" hot." ) }. each { k , v -> systemProperty k, v }
175+
125176 // Show test output for diagnostics
126177 testLogging {
127178 showStandardStreams = true
0 commit comments