Fix lost callbacks due to time drift between server and emulator

Reviewed By: yungsters

Differential Revision: D3434921

fbshipit-source-id: ec82374a8ed322d99beadac78a415f952ceb3ec8
This commit is contained in:
Krishna Monian
2016-06-15 13:13:09 -07:00
committed by Facebook Github Bot 0
parent f236667a17
commit 12a87b6674
6 changed files with 27 additions and 12 deletions

View File

@@ -4,20 +4,21 @@ android_library(
name = 'testing',
srcs = glob(['**/*.java']),
deps = [
react_native_target('java/com/facebook/react:react'),
react_native_target('java/com/facebook/react/bridge:bridge'),
react_native_target('java/com/facebook/react/common:common'),
react_native_target('java/com/facebook/react/modules/core:core'),
react_native_target('java/com/facebook/react/modules/debug:debug'),
react_native_target('java/com/facebook/react/devsupport:devsupport'),
react_native_target('java/com/facebook/react/shell:shell'),
react_native_target('java/com/facebook/react/uimanager:uimanager'),
react_native_dep('libraries/soloader/java/com/facebook/soloader:soloader'),
react_native_dep('third-party/android/support/v4:lib-support-v4'),
react_native_dep('third-party/java/infer-annotations:infer-annotations'),
react_native_dep('third-party/java/jsr-305:jsr-305'),
react_native_dep('third-party/java/junit:junit'),
react_native_dep('third-party/java/mockito:mockito'),
react_native_dep('third-party/java/testing-support-lib:runner'),
react_native_target('java/com/facebook/react/bridge:bridge'),
react_native_target('java/com/facebook/react/common:common'),
react_native_target('java/com/facebook/react/devsupport:devsupport'),
react_native_target('java/com/facebook/react/modules/core:core'),
react_native_target('java/com/facebook/react/modules/debug:debug'),
react_native_target('java/com/facebook/react/shell:shell'),
react_native_target('java/com/facebook/react/uimanager:uimanager'),
react_native_target('java/com/facebook/react:react'),
],
visibility = [
'PUBLIC',

View File

@@ -30,10 +30,12 @@ import com.facebook.react.bridge.SoftAssertions;
import com.facebook.react.bridge.UiThreadUtil;
import com.facebook.react.common.ApplicationHolder;
import com.facebook.react.common.futures.SimpleSettableFuture;
import com.facebook.react.devsupport.DevSupportManager;
import com.facebook.react.modules.core.Timing;
import com.facebook.soloader.SoLoader;
import static org.mockito.Mockito.*;
/**
* Use this class for writing integration tests of catalyst. This class will run all JNI call
@@ -137,7 +139,7 @@ public abstract class ReactIntegrationTestCase extends AndroidTestCase {
new Runnable() {
@Override
public void run() {
Timing timing = new Timing(getContext());
Timing timing = new Timing(getContext(), mock(DevSupportManager.class));
simpleSettableFuture.set(timing);
}
});