File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
pkg/analysis_server/test/integration/support Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -598,14 +598,24 @@ class Server {
598
598
*/
599
599
void listenToOutput (NotificationProcessor notificationProcessor) {
600
600
_process.stdout
601
- .transform (( new Utf8Codec ()) .decoder)
601
+ .transform (utf8 .decoder)
602
602
.transform (new LineSplitter ())
603
603
.listen ((String line) {
604
604
lastCommunicationTime = currentElapseTime;
605
605
String trimmedLine = line.trim ();
606
- if (trimmedLine.startsWith ('Observatory listening on ' )) {
606
+
607
+ // Guard against lines like:
608
+ // {"event":"server.connected","params":{...}}Observatory listening on ...
609
+ final String observatoryMessage = 'Observatory listening on ' ;
610
+ if (trimmedLine.contains (observatoryMessage)) {
611
+ trimmedLine = trimmedLine
612
+ .substring (0 , trimmedLine.indexOf (observatoryMessage))
613
+ .trim ();
614
+ }
615
+ if (trimmedLine.isEmpty) {
607
616
return ;
608
617
}
618
+
609
619
_recordStdio ('<== $trimmedLine ' );
610
620
var message;
611
621
try {
You can’t perform that action at this time.
0 commit comments