Skip to content

Commit d581cdf

Browse files
committed
Upgrade to 1.0.0.RC5.
Closes #143.
1 parent bfe9ce3 commit d581cdf

File tree

3 files changed

+53
-12
lines changed

3 files changed

+53
-12
lines changed

rxjava-reactive-streams/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ apply plugin: 'java'
44

55
dependencies {
66
compile 'io.reactivex:rxjava:1.0.+'
7-
compile 'org.reactivestreams:reactive-streams:1.0.0.RC4'
8-
testCompile 'org.reactivestreams:reactive-streams-tck:1.0.0.RC4'
7+
compile 'org.reactivestreams:reactive-streams:1.0.0.RC5'
8+
testCompile 'org.reactivestreams:reactive-streams-tck:1.0.0.RC5'
99
}
1010

1111
test {

rxjava-reactive-streams/src/test/java/rx/reactivestreams/TckPublisherTest.java renamed to rxjava-reactive-streams/src/test/java/rx/reactivestreams/TckAsynchronousPublisherTest.java

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,15 @@
2626
import rx.schedulers.Schedulers;
2727

2828
@Test
29-
public class TckPublisherTest extends PublisherVerification<Long> {
29+
public class TckAsynchronousPublisherTest extends PublisherVerification<Long> {
3030

31-
public static final long DEFAULT_TIMEOUT_MILLIS = 300L;
32-
public static final long PUBLISHER_REFERENCE_CLEANUP_TIMEOUT_MILLIS = 1000L;
33-
34-
public TckPublisherTest() {
35-
super(new TestEnvironment(DEFAULT_TIMEOUT_MILLIS), PUBLISHER_REFERENCE_CLEANUP_TIMEOUT_MILLIS);
31+
public TckAsynchronousPublisherTest() {
32+
super(new TestEnvironment(300L));
3633
}
3734

3835
@Override
3936
public Publisher<Long> createPublisher(long elements) {
40-
return RxReactiveStreams.toPublisher(
41-
Observable.from(new CountdownIterable(elements))
42-
.observeOn(Schedulers.computation())
43-
);
37+
return RxReactiveStreams.toPublisher(Observable.from(new CountdownIterable(elements)).observeOn(Schedulers.computation()));
4438
}
4539

4640
@Override
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
/**
2+
* Copyright 2014 Netflix, Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package rx.reactivestreams;
18+
19+
import org.reactivestreams.Publisher;
20+
import org.reactivestreams.tck.PublisherVerification;
21+
import org.reactivestreams.tck.TestEnvironment;
22+
import org.testng.annotations.Test;
23+
import rx.Observable;
24+
import rx.RxReactiveStreams;
25+
import rx.reactivestreams.test.CountdownIterable;
26+
27+
@Test
28+
public class TckSynchronousPublisherTest extends PublisherVerification<Long> {
29+
30+
public TckSynchronousPublisherTest() {
31+
super(new TestEnvironment(300L));
32+
}
33+
34+
@Override
35+
public Publisher<Long> createPublisher(long elements) {
36+
return RxReactiveStreams.toPublisher(Observable.from(new CountdownIterable(elements)));
37+
}
38+
39+
@Override
40+
public Publisher<Long> createFailedPublisher() {
41+
// Null because we always successfully subscribe.
42+
// If the observable is in error state, it will subscribe and then emit the error as the first item
43+
// This is not an “error state” publisher as defined by RS
44+
return null;
45+
}
46+
47+
}

0 commit comments

Comments
 (0)