Skip to content

Commit 142ee95

Browse files
AndrewJackmacdoum1
authored andcommitted
Fix ReactImagePropertyTest SoLoader failures (facebook#19607)
Summary: Fixes facebook#18637 & facebook#19309 <!-- Required: Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Bonus points for screenshots and videos! --> Check Android `ReactImagePropertyTest` tests pass. <!-- Does this PR require a documentation change? Create a PR at https://github.com/facebook/react-native-website and add a link to it here. --> <!-- Required. Help reviewers and the release process by writing your own release notes. See below for an example. --> [ANDROID] [BUGFIX] [Unit Tests] - Fix ReactImagePropertyTest SoLoader failure <!-- **INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.** CATEGORY [----------] TYPE [ CLI ] [-------------] LOCATION [ DOCS ] [ BREAKING ] [-------------] [ GENERAL ] [ BUGFIX ] [ {Component} ] [ INTERNAL ] [ ENHANCEMENT ] [ {Filename} ] [ IOS ] [ FEATURE ] [ {Directory} ] |-----------| [ ANDROID ] [ MINOR ] [ {Framework} ] - | {Message} | [----------] [-------------] [-------------] |-----------| EXAMPLES: [IOS] [BREAKING] [FlatList] - Change a thing that breaks other things [ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput [CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with [DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word [GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position [INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see --> Closes facebook#19607 Differential Revision: D8325415 Pulled By: hramos fbshipit-source-id: 598baa3499646bb50da065815c19bb9f76bf6c87
1 parent a902cc7 commit 142ee95

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

ReactAndroid/src/test/java/com/facebook/react/views/BUCK

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ rn_robolectric_test(
1313
react_native_dep("libraries/fresco/fresco-react-native:fresco-drawee"),
1414
react_native_dep("libraries/fresco/fresco-react-native:fresco-react-native"),
1515
react_native_dep("libraries/fresco/fresco-react-native:imagepipeline"),
16+
react_native_dep("libraries/soloader/java/com/facebook/soloader:soloader"),
1617
react_native_dep("third-party/java/fest:fest"),
1718
react_native_dep("third-party/java/jsr-305:jsr-305"),
1819
react_native_dep("third-party/java/junit:junit"),

ReactAndroid/src/test/java/com/facebook/react/views/image/ReactImagePropertyTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import com.facebook.react.uimanager.ReactStylesDiffMap;
2121
import com.facebook.react.uimanager.DisplayMetricsHolder;
2222
import com.facebook.react.uimanager.ThemedReactContext;
23+
import com.facebook.soloader.SoLoader;
2324

2425
import org.junit.After;
2526
import org.junit.Before;
@@ -53,6 +54,7 @@ public class ReactImagePropertyTest {
5354

5455
@Before
5556
public void setup() {
57+
SoLoader.setInTestMode();
5658
mContext = new ReactApplicationContext(RuntimeEnvironment.application);
5759
mCatalystInstanceMock = ReactTestHelper.createMockCatalystInstance();
5860
mContext.initializeWithInstance(mCatalystInstanceMock);

0 commit comments

Comments
 (0)