Fix: Add @ConscryptMode annotation to FileTransferTest to resolve UnsatisfiedLinkError (#543)

Robolectric 4.9+ uses Conscrypt as the default security provider, which
requires native libraries that aren't available in the test environment.
Adding @ConscryptMode(Mode.OFF) disables Conscrypt and uses BouncyCastle
instead, which resolves the test failures.

This fixes the build failures in FileTransferTest where all 9 tests were
failing with UnsatisfiedLinkError when Conscrypt tried to load native
libraries.

Fixes #542
This commit is contained in:
Rebroad
2026-01-04 13:41:38 +07:00
committed by GitHub
parent 7c183b0c8d
commit 54c96bd737
@@ -8,12 +8,14 @@ import org.junit.Assert.assertNotNull
import org.junit.Test
import org.junit.runner.RunWith
import org.robolectric.RobolectricTestRunner
import org.robolectric.annotation.ConscryptMode
import java.io.File
import java.nio.ByteBuffer
import java.nio.ByteOrder
import java.util.Date
@RunWith(RobolectricTestRunner::class)
@ConscryptMode(ConscryptMode.Mode.OFF) // Disable Conscrypt to avoid native library loading issues
class FileTransferTest {
@Test