Skip to content

Commit 43b9c63

Browse files
jgrnrtonobc
authored andcommitted
Fix kotlin-server sample app
This adds the missing micrometer context-propagation dependency to both build.gradle and pom.xml Signed-off-by: Jeremy Grunert <gotteswillenwilles@gmail.com> Signed-off-by: onobc <chris.bono@gmail.com>
1 parent 9839b78 commit 43b9c63

File tree

5 files changed

+12
-15
lines changed

5 files changed

+12
-15
lines changed

samples/grpc-server-kotlin/build.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ dependencies {
3535

3636
implementation 'org.springframework.grpc:spring-grpc-spring-boot-starter'
3737
implementation 'org.springframework.boot:spring-boot-starter-actuator'
38+
implementation("io.micrometer:context-propagation:1.2.0")
39+
implementation 'io.grpc:grpc-services'
40+
implementation "io.grpc:grpc-kotlin-stub:${kotlinStubVersion}"
41+
3842
implementation "org.jetbrains.kotlin:kotlin-reflect"
3943
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core'
4044
implementation "io.grpc:grpc-kotlin-stub:${kotlinStubVersion}"

samples/grpc-server-kotlin/pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,12 @@
7575
<artifactId>spring-boot-starter-test</artifactId>
7676
<scope>test</scope>
7777
</dependency>
78+
<dependency>
79+
<groupId>io.micrometer</groupId>
80+
<artifactId>context-propagation</artifactId>
81+
<version>1.2.0</version>
82+
</dependency>
83+
7884
<dependency>
7985
<!-- for testing unix domain sockets -->
8086
<groupId>io.netty</groupId>

samples/grpc-server-kotlin/src/test/kotlin/org/springframework/grpc/sample/GrpcServerApplicationTests.kt

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,12 @@ import org.springframework.test.annotation.DirtiesContext
1717
"spring.grpc.server.port=0",
1818
"spring.grpc.client.default-channel.address=0.0.0.0:\${local.grpc.port}"
1919
],
20-
useMainMethod = UseMainMethod.ALWAYS
2120
)
2221
@DirtiesContext
2322
class GrpcServerApplicationTests {
2423

24+
private val log: Log = LogFactory.getLog(this.javaClass)
25+
2526
@Autowired
2627
private lateinit var stub: SimpleBlockingStub
2728

@@ -39,13 +40,4 @@ class GrpcServerApplicationTests {
3940
)
4041
Assertions.assertEquals("Hello ==> Alien", response.getMessage())
4142
}
42-
43-
companion object {
44-
private val log: Log = LogFactory.getLog(GrpcServerApplicationTests::class.java)
45-
46-
@JvmStatic
47-
fun main(args: Array<String>) {
48-
SpringApplicationBuilder(GrpcServerApplication::class.java).run()
49-
}
50-
}
5143
}

samples/grpc-server-kotlin/src/test/resources/application-ssl.properties

Lines changed: 0 additions & 5 deletions
This file was deleted.
-2.21 KB
Binary file not shown.

0 commit comments

Comments
 (0)