)]}'
{
  "commit": "180aa0c0b1fc645aa661a9aeedc21ed91c93ad00",
  "tree": "dcbea6f2fd2353e00eed3e19ad44836bc567eeae",
  "parents": [
    "5241224f3b72f369396c55b0aff99160fc08af56"
  ],
  "author": {
    "name": "liyuqian",
    "email": "liyuqian@google.com",
    "time": "Tue Jul 16 08:30:26 2019 -0700"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Tue Jul 16 08:30:26 2019 -0700"
  },
  "message": "Fix flaky peer connection (#36089)\n\nFixes https://github.com/flutter/flutter/issues/36091.\r\n\r\nPreviously, a sendRequest will be sent even if the peer is closed during\r\na driver test. That will cause a time out without any error information.\r\nSuch issue is unreproducible on my Mac Book Pro, but 100% reproducible\r\non our new Mac mini (2018).\r\n\r\nThe closing issue is tracked in https://github.com/flutter/flutter/issues/36268\r\n\r\nAdditional to this fix, we should also patch the jason_rpc_2 so the peer\r\nwill throw exception if sendRequest is attempted while the connection is\r\nclosed.\r\n\r\n**Test**:\r\ntiles_scroll_perf_iphonexs__timeline_summary failed without this patch.\r\nIt will pass after this patch.\r\n\r\nI\u0027m not sure how to add a unit test for this. Please let me know if you have\r\nsome ideas.\r\n\r\nThis patch will generate the following warning log on the new Mac Mini\r\n```\r\nflutter: Observatory listening on http://127.0.0.1:50192/cZPDF4sW7MM\u003d/  \r\nInstalling and launching...                                        10.2s\r\n00:00 +0: scrolling performance test (setUpAll)\r\n[info ] FlutterDriver: Connecting to Flutter application at http://127.0.0.1:1069/cZPDF4sW7MM\u003d/\r\n[trace] FlutterDriver: Isolate found with number: 3684677742843303\r\n[trace] FlutterDriver: Isolate is paused at start.\r\n[trace] FlutterDriver: Attempting to resume isolate\r\n[trace] FlutterDriver: Waiting for service extension\r\n[info ] FlutterDriver: Connected to Flutter application.\r\n00:00 +0: scrolling performance test complex_layout_scroll_perf\r\n[warning] FlutterDriver: Instance of \u0027_WebSocketImpl\u0027 is closed with an unexpected code 1005\r\n[warning] FlutterDriver: Peer connection is closed! Trying to restore the connection...\r\n00:10 +1: scrolling performance test tiles_scroll_perf\r\n[warning] FlutterDriver: Instance of \u0027_WebSocketImpl\u0027 is closed with an unexpected code 1005\r\n[warning] FlutterDriver: Peer connection is closed! Trying to restore the connection...\r\n00:20 +2: scrolling performance test (tearDownAll)\r\n00:20 +2: All tests passed!\r\nStopping application instance.\r\n```",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "285860ac6ca2c4ac0e0f72980c99eb06452db3fb",
      "old_mode": 33188,
      "old_path": "packages/flutter_driver/lib/src/driver/driver.dart",
      "new_id": "869f0c43f486830d0c4d749637d0b523df6ab524",
      "new_mode": 33188,
      "new_path": "packages/flutter_driver/lib/src/driver/driver.dart"
    },
    {
      "type": "modify",
      "old_id": "a08f8b3b298b447990933a7ea4751ae8fd22d348",
      "old_mode": 33188,
      "old_path": "packages/flutter_driver/test/flutter_driver_test.dart",
      "new_id": "0ecf0361655d6dbe4aaa5c90dec557e1b15d9801",
      "new_mode": 33188,
      "new_path": "packages/flutter_driver/test/flutter_driver_test.dart"
    }
  ]
}
