mirror of
https://github.com/permissionlesstech/bitchat-android.git
synced 2026-07-25 03:45:21 +00:00
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:
@@ -8,12 +8,14 @@ import org.junit.Assert.assertNotNull
|
|||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import org.junit.runner.RunWith
|
import org.junit.runner.RunWith
|
||||||
import org.robolectric.RobolectricTestRunner
|
import org.robolectric.RobolectricTestRunner
|
||||||
|
import org.robolectric.annotation.ConscryptMode
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import java.nio.ByteBuffer
|
import java.nio.ByteBuffer
|
||||||
import java.nio.ByteOrder
|
import java.nio.ByteOrder
|
||||||
import java.util.Date
|
import java.util.Date
|
||||||
|
|
||||||
@RunWith(RobolectricTestRunner::class)
|
@RunWith(RobolectricTestRunner::class)
|
||||||
|
@ConscryptMode(ConscryptMode.Mode.OFF) // Disable Conscrypt to avoid native library loading issues
|
||||||
class FileTransferTest {
|
class FileTransferTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
Reference in New Issue
Block a user