Skip to content

Commit dab2d6d

Browse files
update gradle & dependencies (#62)
1 parent b075975 commit dab2d6d

File tree

4 files changed

+30
-28
lines changed

4 files changed

+30
-28
lines changed

build.gradle

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,29 +15,29 @@
1515
*/
1616

1717
plugins {
18-
id 'com.gradle.build-scan' version '1.16'
19-
id 'io.spring.dependency-management' version '1.0.6.RELEASE' apply false
18+
id 'com.gradle.build-scan' version '2.3'
19+
id 'io.spring.dependency-management' version '1.0.8.RELEASE' apply false
2020
id 'com.jfrog.bintray' version '1.8.4' apply false
21-
id 'com.jfrog.artifactory' version '4.7.3' apply false
22-
id 'org.jetbrains.kotlin.jvm' version '1.2.71' apply false
21+
id 'com.jfrog.artifactory' version '4.9.7' apply false
22+
id 'org.jetbrains.kotlin.jvm' version '1.3.31' apply false
2323
}
2424

2525
subprojects {
2626
apply plugin: 'java-library'
2727
apply plugin: 'kotlin'
2828
apply plugin: 'io.spring.dependency-management'
2929

30-
ext['netty-buffer.version'] = '4.1.30.Final'
30+
ext['netty-buffer.version'] = '4.1.37.Final'
3131
ext['jsr305.version'] = '3.0.2'
32-
ext['kotlin-stdlib-jdk7.version'] = '1.2.71'
33-
ext['rxjava.version'] = '2.2.2'
32+
ext['kotlin-stdlib-jdk7.version'] = '1.3.41'
33+
ext['rxjava.version'] = '2.2.10'
3434
ext['slf4j-api.version'] = '1.7.25'
3535
ext['junit.version'] = '4.12'
36-
ext['mockito.version'] = '2.23.0'
36+
ext['mockito.version'] = '2.28.2'
3737
ext['hamcrest-library.version'] = '1.3'
3838
ext['slf4j-log4j.version'] = '1.7.25'
39-
ext['reactor-netty.version'] = '0.7.10.RELEASE'
40-
ext['okhttp.version'] = '3.11.0'
39+
ext['reactor-netty.version'] = '0.7.15.RELEASE'
40+
ext['okhttp.version'] = '3.14.2'
4141

4242
dependencyManagement {
4343

@@ -104,6 +104,6 @@ apply from: 'gradle/bintray.gradle'
104104
description = 'RSocket-kotlin: Reactive Streams over network boundary with Kotlin/Rxjava'
105105

106106
buildScan {
107-
licenseAgreementUrl = 'https://gradle.com/terms-of-service'
108-
licenseAgree = 'yes'
107+
termsOfServiceUrl = 'https://gradle.com/terms-of-service'
108+
termsOfServiceAgree = 'yes'
109109
}

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@
1616

1717
release.scope=patch
1818
version=0.9.7-SNAPSHOT
19-
org.gradle.parallel=false
20-
org.gradle.configureondemand=false
19+
org.gradle.parallel=true
20+
org.gradle.configureondemand=true
2121

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
33
zipStoreBase=GRADLE_USER_HOME
44
zipStorePath=wrapper/dists
5-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.7-all.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.5-all.zip

test/src/test/kotlin/io/rsocket/kotlin/test/InteractionsStressTest.kt

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import io.reactivex.Single
2121
import io.reactivex.disposables.CompositeDisposable
2222
import io.reactivex.disposables.Disposable
2323
import io.reactivex.processors.UnicastProcessor
24-
import io.reactivex.schedulers.Schedulers
2524
import io.rsocket.kotlin.*
2625
import io.rsocket.kotlin.transport.netty.client.TcpClientTransport
2726
import io.rsocket.kotlin.transport.netty.server.NettyContextCloseable
@@ -33,6 +32,7 @@ import org.junit.Test
3332
import org.reactivestreams.Publisher
3433
import java.net.InetSocketAddress
3534
import java.util.concurrent.TimeUnit
35+
import kotlin.math.max
3636

3737
class InteractionsStressTest {
3838
private lateinit var server: NettyContextCloseable
@@ -75,10 +75,10 @@ class InteractionsStressTest {
7575
interaction(
7676
{ payload -> payload.matches("response") },
7777
{
78-
it.flatMapSingle { num ->
78+
it.flatMapSingle( { num ->
7979
client.requestResponse(
8080
DefaultPayload.text("response$num"))
81-
}
81+
}, false, interactionConcurrency)
8282
})
8383
}
8484

@@ -87,10 +87,10 @@ class InteractionsStressTest {
8787
interaction(
8888
{ payload -> payload.matches("stream") },
8989
{
90-
it.flatMap { num ->
90+
it.flatMap ({ num ->
9191
client.requestStream(
9292
DefaultPayload.text("stream$num"))
93-
}
93+
}, false, interactionConcurrency)
9494
})
9595
}
9696

@@ -99,10 +99,10 @@ class InteractionsStressTest {
9999
interaction(
100100
{ payload -> payload.matches("channel") },
101101
{
102-
it.flatMap { num ->
102+
it.flatMap ({ num ->
103103
client.requestChannel(
104104
Flowable.just(DefaultPayload.text("channel$num")))
105-
}
105+
},false, interactionConcurrency)
106106
})
107107
}
108108

@@ -116,8 +116,8 @@ class InteractionsStressTest {
116116

117117
val errors = UnicastProcessor.create<Long>()
118118
val disposable = CompositeDisposable()
119-
repeat(threadsNum()) {
120-
disposable += interaction(source().observeOn(Schedulers.io()))
119+
repeat(interactionCount) {
120+
disposable += interaction(source())
121121
.subscribe({ res ->
122122
if (!pred(res)) {
123123
errors.onError(
@@ -142,8 +142,6 @@ class InteractionsStressTest {
142142

143143
}
144144

145-
private fun threadsNum() = Runtime.getRuntime().availableProcessors()
146-
147145
internal class TestHandler
148146
: AbstractRSocket() {
149147

@@ -170,11 +168,15 @@ class InteractionsStressTest {
170168

171169
companion object {
172170
private fun source() =
173-
Flowable.interval(intervalMillis, TimeUnit.MICROSECONDS)
171+
Flowable.interval(intervalMillis, TimeUnit.MILLISECONDS)
174172
.onBackpressureDrop()
175173

176-
private const val intervalMillis: Long = 100
174+
private const val intervalMillis: Long = 1
177175

178176
private const val testDuration = 20L
177+
178+
private val interactionCount = max(1, Runtime.getRuntime().availableProcessors() / 2)
179+
180+
private const val interactionConcurrency = 4
179181
}
180182
}

0 commit comments

Comments
 (0)