@@ -107,6 +107,7 @@ impl StdErrLines {
107
107
108
108
loop {
109
109
let line = self . next ( ) . unwrap ( ) ;
110
+
110
111
assert_eq ! ( line, expected_lines[ expected_index] ) ;
111
112
expected_index += 1 ;
112
113
@@ -510,6 +511,7 @@ async fn inspector_does_not_hang() {
510
511
] ,
511
512
)
512
513
. await ;
514
+
513
515
tester
514
516
. send ( json ! ( { "id" : 4 , "method" : "Runtime.runIfWaitingForDebugger" } ) )
515
517
. await ;
@@ -519,6 +521,7 @@ async fn inspector_does_not_hang() {
519
521
& [ r#"{"method":"Debugger.paused","# ] ,
520
522
)
521
523
. await ;
524
+
522
525
tester
523
526
. send ( json ! ( { "id" : 5 , "method" : "Debugger.resume" } ) )
524
527
. await ;
@@ -528,6 +531,7 @@ async fn inspector_does_not_hang() {
528
531
& [ r#"{"method":"Debugger.resumed","params":{}}"# ] ,
529
532
)
530
533
. await ;
534
+
531
535
for i in 0 ..128u32 {
532
536
let request_id = i + 10 ;
533
537
// Expect the number {i} on stdout.
@@ -543,6 +547,7 @@ async fn inspector_does_not_hang() {
543
547
] ,
544
548
)
545
549
. await ;
550
+
546
551
tester
547
552
. send ( json ! ( { "id" : request_id, "method" : "Debugger.resume" } ) )
548
553
. await ;
@@ -560,6 +565,7 @@ async fn inspector_does_not_hang() {
560
565
. write_frame ( Frame :: close_raw ( vec ! [ ] . into ( ) ) )
561
566
. await
562
567
. unwrap ( ) ;
568
+
563
569
assert_eq ! ( & tester. stdout_lines. next( ) . unwrap( ) , "done" ) ;
564
570
// TODO(bartlomieju): this line makes no sense - if the inspector is connected then the
565
571
// process should not exit on its own.
@@ -599,6 +605,7 @@ async fn inspector_runtime_evaluate_does_not_crash() {
599
605
. arg ( "repl" )
600
606
. arg ( "--allow-read" )
601
607
. arg ( inspect_flag_with_unique_port ( "--inspect" ) )
608
+ . env ( "RUST_BACKTRACE" , "1" )
602
609
. stdin ( std:: process:: Stdio :: piped ( ) )
603
610
. piped_output ( )
604
611
. spawn ( )
@@ -1127,8 +1134,9 @@ async fn inspector_profile() {
1127
1134
. unwrap ( ) ;
1128
1135
1129
1136
let mut tester = InspectorTester :: create ( child, ignore_script_parsed) . await ;
1130
- tokio :: time :: sleep ( tokio :: time :: Duration :: from_millis ( 3000 ) ) . await ;
1137
+
1131
1138
tester. assert_stderr_for_inspect_brk ( ) ;
1139
+
1132
1140
tester
1133
1141
. send_many ( & [
1134
1142
json ! ( { "id" : 1 , "method" : "Runtime.enable" } ) ,
@@ -1158,6 +1166,7 @@ async fn inspector_profile() {
1158
1166
& [ r#"{"method":"Debugger.paused","# ] ,
1159
1167
)
1160
1168
. await ;
1169
+
1161
1170
tester. send_many (
1162
1171
& [
1163
1172
json ! ( { "id" : 5 , "method" : "Profiler.setSamplingInterval" , "params" : { "interval" : 100 } } ) ,
@@ -1170,6 +1179,7 @@ async fn inspector_profile() {
1170
1179
& [ ] ,
1171
1180
)
1172
1181
. await ;
1182
+
1173
1183
tokio:: time:: sleep ( tokio:: time:: Duration :: from_millis ( 500 ) ) . await ;
1174
1184
1175
1185
tester
@@ -1185,6 +1195,7 @@ async fn inspector_profile() {
1185
1195
) ;
1186
1196
profile[ "samples" ] . as_array ( ) . unwrap ( ) ;
1187
1197
profile[ "nodes" ] . as_array ( ) . unwrap ( ) ;
1198
+
1188
1199
tester. child . kill ( ) . unwrap ( ) ;
1189
1200
tester. child . wait ( ) . unwrap ( ) ;
1190
1201
}
0 commit comments