@@ -141,10 +141,7 @@ object DebugServerSpec extends DebugBspBaseSuite {
141
141
} yield {
142
142
assert(client.socket.isClosed)
143
143
assertNoDiff(
144
- output.linesIterator
145
- .filterNot(_.contains(" ERROR: JDWP Unable to get JNI 1.2 environment" ))
146
- .filterNot(_.contains(" JDWP exit error AGENT_ERROR_NO_JNI_ENV" ))
147
- .mkString(lineSeparator),
144
+ output.linesIterator.toSeq.last,
148
145
" Hello, World!"
149
146
)
150
147
}
@@ -177,7 +174,7 @@ object DebugServerSpec extends DebugBspBaseSuite {
177
174
project,
178
175
state,
179
176
arguments = List (" hello" ),
180
- jvmOptions = List (" -J- Dworld=world" ),
177
+ jvmOptions = List (" -Dworld=world" ),
181
178
environmentVariables = List (" EXCL=!" )
182
179
)
183
180
@@ -194,10 +191,7 @@ object DebugServerSpec extends DebugBspBaseSuite {
194
191
} yield {
195
192
assert(client.socket.isClosed)
196
193
assertNoDiff(
197
- output.linesIterator
198
- .filterNot(_.contains(" ERROR: JDWP Unable to get JNI 1.2 environment" ))
199
- .filterNot(_.contains(" JDWP exit error AGENT_ERROR_NO_JNI_ENV" ))
200
- .mkString(lineSeparator),
194
+ output.linesIterator.toSeq.takeRight(2 ).mkString(lineSeparator),
201
195
" hello\n world!"
202
196
)
203
197
}
@@ -370,7 +364,7 @@ object DebugServerSpec extends DebugBspBaseSuite {
370
364
} yield {
371
365
assert(client.socket.isClosed)
372
366
assertNoDiff(
373
- finalOutput,
367
+ finalOutput.linesIterator.toSeq.takeRight( 7 ).mkString(lineSeparator) ,
374
368
""" |Breakpoint in main method
375
369
|Breakpoint in hello class
376
370
|Breakpoint in hello inner class
@@ -624,6 +618,7 @@ object DebugServerSpec extends DebugBspBaseSuite {
624
618
for {
625
619
port <- startRemoteProcess(buildProject, testState)
626
620
client <- server.startConnection
621
+ initOutput <- client.takeCurrentOutput
627
622
_ <- client.initialize()
628
623
_ <- client.attach(" localhost" , port)
629
624
breakpoints <- client.setBreakpoints(breakpoints)
@@ -639,12 +634,8 @@ object DebugServerSpec extends DebugBspBaseSuite {
639
634
} yield {
640
635
assert(client.socket.isClosed)
641
636
642
- assertNoDiff(outputOnBreakpoint, " " )
643
-
644
- assertNoDiff(
645
- finalOutput,
646
- " "
647
- )
637
+ assertNoDiff(outputOnBreakpoint, initOutput)
638
+ assertNoDiff(finalOutput, initOutput)
648
639
}
649
640
}
650
641
}
@@ -746,7 +737,7 @@ object DebugServerSpec extends DebugBspBaseSuite {
746
737
_ <- Task .fromFuture(client.closedPromise.future)
747
738
} yield {
748
739
assert(client.socket.isClosed)
749
- assertNoDiff(finalOutput, workspace.toString)
740
+ assertNoDiff(finalOutput.linesIterator.toSeq.last , workspace.toString)
750
741
}
751
742
}
752
743
}
0 commit comments