Uh oh!
There was an error while loading. Please reload this page.
1.x: Run tests on Android! - #3519
Conversation
There was a problem hiding this comment.
Not needed. .travis.yml takes care of this.
There was a problem hiding this comment.
It's for developers, I guess @akarnokd used it without noticing :)
On Fri, Nov 13, 2015, 07:47 Jake Wharton notifications@github.com wrote:
In android-tests/build.gradle
#3519 (comment):@@ -0,0 +1,61 @@
+buildscript {
- repositories {
jcenter()- }
- dependencies {
// Android Gradle pluginclasspath 'com.android.tools.build:gradle:1.3.1'// Resolves android-sdk dependenciesclasspath 'com.jakewharton.sdkmanager:gradle-plugin:0.12.0'Not needed. .travis.yml takes care of this.
—
Reply to this email directly or view it on GitHub
https://github.com/ReactiveX/RxJava/pull/3519/files#r44749555.
@artem_zin
There was a problem hiding this comment.
I'm amazed it even still works.
On Thu, Nov 12, 2015 at 11:51 PM Artem Zinnatullin notifications@github.com
wrote:
In android-tests/build.gradle
#3519 (comment):@@ -0,0 +1,61 @@
+buildscript {
- repositories {
jcenter()- }
- dependencies {
// Android Gradle pluginclasspath 'com.android.tools.build:gradle:1.3.1'// Resolves android-sdk dependenciesclasspath 'com.jakewharton.sdkmanager:gradle-plugin:0.12.0'It's for developers, I guess @akarnokdhttps://github.com/akarnokd used
it without noticing :)
On Fri, Nov 13, 2015, 07:47 Jake Wharton notifications@github.com
wrote: In android-tests/build.gradle <#3519 (comment)
https://github.com/ReactiveX/RxJava/pull/3519#discussion_r44749555>: >
@@ -0,0 +1,61 @@ > +buildscript { > + repositories { > + jcenter() > + } >
- dependencies { > + // Android Gradle plugin > + classpath
'com.android.tools.build:gradle:1.3.1' > + > + // Resolves android-sdk
dependencies > + classpath
'com.jakewharton.sdkmanager:gradle-plugin:0.12.0' Not needed. .travis.yml
takes care of this. — Reply to this email directly or view it on GitHub <
https://github.com/ReactiveX/RxJava/pull/3519/files#r44749555>.
-- @artem_zin—
Reply to this email directly or view it on GitHub
https://github.com/ReactiveX/RxJava/pull/3519/files#r44749702.
There was a problem hiding this comment.
Well, would be nice to see new releases! Sometimes it can not handle
support libraries updates. But anyway, great tool.
On Fri, Nov 13, 2015, 07:52 Jake Wharton notifications@github.com wrote:
In android-tests/build.gradle
#3519 (comment):@@ -0,0 +1,61 @@
+buildscript {
- repositories {
jcenter()- }
- dependencies {
// Android Gradle pluginclasspath 'com.android.tools.build:gradle:1.3.1'// Resolves android-sdk dependenciesclasspath 'com.jakewharton.sdkmanager:gradle-plugin:0.12.0'I'm amazed it even still works.
… <#msg-f:1517698800156585010_>
On Thu, Nov 12, 2015 at 11:51 PM Artem Zinnatullin <
notifications@github.com> wrote: In android-tests/build.gradle <#3519
(comment)
https://github.com/ReactiveX/RxJava/pull/3519#discussion_r44749702>: >
@@ -0,0 +1,61 @@ > +buildscript { > + repositories { > + jcenter() > + } >
- dependencies { > + // Android Gradle plugin > + classpath
'com.android.tools.build:gradle:1.3.1' > + > + // Resolves android-sdk
dependencies > + classpath
'com.jakewharton.sdkmanager:gradle-plugin:0.12.0' It's for developers, I
guess @akarnokdhttps://github.com/akarnokdhttps://github.com/akarnokd
used it without noticing :) On Fri, Nov 13, 2015, 07:47 Jake Wharton <
notifications@github.com> wrote: In android-tests/build.gradle <1.x: Run tests on Android! #3519
1.x: Run tests on Android! #3519 (comment) <1.x: Run tests on Android! #3519 (comment)
https://github.com/ReactiveX/RxJava/pull/3519#discussion_r44749555>>: >
@@ -0,0 +1,61 @@ > +buildscript { > + repositories { > + jcenter() > + } >
- dependencies { > + // Android Gradle plugin > + classpath
'com.android.tools.build:gradle:1.3.1' > + > + // Resolves android-sdk
dependencies > + classpath
'com.jakewharton.sdkmanager:gradle-plugin:0.12.0' Not needed. .travis.yml
takes care of this. — Reply to this email directly or view it on GitHub <
https://github.com/ReactiveX/RxJava/pull/3519/files#r44749555>. --
@artem_zin — Reply to this email directly or view it on GitHub <
https://github.com/ReactiveX/RxJava/pull/3519/files#r44749702>.—
Reply to this email directly or view it on GitHub
https://github.com/ReactiveX/RxJava/pull/3519/files#r44749727.
@artem_zin
akarnokd
commented
Nov 13, 2015
Can we do this without moving any files? |
artem-zinnatullin
commented
Nov 13, 2015
Not sure, unfortunately. Though I'll try it today, if somebody already done this — please comment. |
93e9322 to
f7a1c58Compareartem-zinnatullin
commented
Nov 15, 2015
@akarnokd done! |
f7a1c58 to
2cb70dcCompare2cb70dc to
8fdaf38CompareThere was a problem hiding this comment.
This fails for some reason. Maybe the underlying thread dies off?
Could you change the code above to use a ThreadFactory with newSingleThreadExecutor and set the uncaught exception handler within the factory?
akarnokd
commented
Nov 22, 2015
Generally, I'm not against testing on Android but I'm afraid it will hinder progress on RxJava due to platform nuances. I remember when RxJava had every other Rx language and tool under the same main project and a change for Java caused build failures because something didn't compile in RxScala or some test failed in RxClojure. Would it be possible to have this as a separate project where Gradle/travis checks out the RxJava code from github and runs the tests on the emulator? |
artem-zinnatullin
commented
Nov 22, 2015
Android is just another Runtime, see it as different JVM (though it's not J-VM, but it does not matter in this case). Scala, Clojure, etc run on the JVM too, so your example is not directly applicable to the intention of running tests on Android. Your example is more about RxAndroid and I agree that it should be separate project and it is in . Thousands of Android apps use RxJava, millions of Android devices run RxJava code every minute. And RxJava has some Platform-dependent code. Would be great to check that it works as expected 😄
It's possible, but it will be very hard since it requires changes of the tests (timeouts, etc). Also, it won't give immediate feedback to PRs in the RxJava. I'm sorry for the delay with this PR, I'm very busy this week, will try to finish it soon. |
avram
commented
Feb 3, 2016
With appropriate privileging, a secondary RxJava test runner outside of this repo could still post status checks to PRs -- it probably couldn't easily use Travis, but a custom runner on Jenkins would have enough flexibility to do that. Concerns about changes to tests would still remain. |
artem-zinnatullin
commented
Feb 3, 2016
I'd still prefer to run tests on Android as part of current RxJava CI, actually there're just few tests fail with timeouts because Android emulator is slow as hell, we can write custom test runner or JUnit rule and add Please feel free (anyone) to work on this, hopefully I'll do it at some point, but I don't have much time right now. |
akarnokd
commented
Jun 17, 2016
I'm still not in favor of running the tests for Android in the same CI process. The alternative I see is to somehow package up the unit tests as well and have a separate project run it it, or if a gradle script could be written to checkout the RxJava sources and run the tests in that way. |
artem-zinnatullin
commented
Jun 17, 2016
Let's close it for now, I have a task to run RxJava tests on Android as part of CI of RxJavaProGuardRules project. Hope I'll find some time to work on it in the summer. |
Closes#3503.
In short:
rxjavagradle module and movedsrctorxjava/src.android-testsmodule and configured it to run tests fromrxjava/src/teston Android.MemoryMXBeantoRuntimeinExecutorSchedulerTestbecauseMemoryMXBeanis not presented on Android.TODO:
@JakeWharton PTAL