test(nests): skip AudioLatencyComparisonTest when -DnestsHangInterop unset
The pre-push hook runs the full `./gradlew test` suite, which doesn't pass `-DnestsHangInterop=true`. Without that flag the sidecars don't exist, so every test in this class blew up on `NativeMoqRelayHarness.shared()` with `IllegalStateException`. Adds a `@BeforeTest` that calls `assumeHangInterop()` and skips the case via JUnit's Assume — same pattern `HangInteropTest`, `HangInteropReverseTest`, and the rest of the `interop/native/` suite already use. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
+15
@@ -48,6 +48,7 @@ import java.time.Instant
|
||||
import java.util.UUID
|
||||
import java.util.concurrent.ConcurrentHashMap
|
||||
import java.util.concurrent.atomic.AtomicLong
|
||||
import kotlin.test.BeforeTest
|
||||
import kotlin.test.assertTrue
|
||||
|
||||
/**
|
||||
@@ -142,6 +143,20 @@ import kotlin.test.assertTrue
|
||||
* `interopBuildSidecars` task produces.
|
||||
*/
|
||||
class AudioLatencyComparisonTest {
|
||||
/**
|
||||
* Skip cleanly when run as part of the default `./gradlew test`
|
||||
* suite — every test in this class drives the cargo-built
|
||||
* `hang-publish` sidecar and the local moq-relay harness, both
|
||||
* of which only exist with `-DnestsHangInterop=true`. Without
|
||||
* this, the pre-push hook (which runs the whole suite) fails on
|
||||
* `NativeMoqRelayHarness.shared()` with an `IllegalStateException`.
|
||||
* Mirrors the pattern in `HangInteropTest`.
|
||||
*/
|
||||
@BeforeTest
|
||||
fun assumeHangInteropEnabled() {
|
||||
NativeMoqRelayHarness.assumeHangInterop()
|
||||
}
|
||||
|
||||
@Test
|
||||
fun clean_path_pacing_and_one_way_latency() = runComparison(scenario = "clean", lossRate = 0.0f)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user