{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/16433","repository_url":"https://api.github.com/repos/apache/spark","labels_url":"https://api.github.com/repos/apache/spark/issues/16433/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/16433/comments","events_url":"https://api.github.com/repos/apache/spark/issues/16433/events","html_url":"https://github.com/apache/spark/pull/16433","id":197975482,"number":16433,"title":"[SPARK-19022][TESTS] Fix tests dependent on OS due to different newline characters","user":{"login":"HyukjinKwon","id":6477701,"avatar_url":"https://avatars.githubusercontent.com/u/6477701?v=3","gravatar_id":"","url":"https://api.github.com/users/HyukjinKwon","html_url":"https://github.com/HyukjinKwon","followers_url":"https://api.github.com/users/HyukjinKwon/followers","following_url":"https://api.github.com/users/HyukjinKwon/following{/other_user}","gists_url":"https://api.github.com/users/HyukjinKwon/gists{/gist_id}","starred_url":"https://api.github.com/users/HyukjinKwon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HyukjinKwon/subscriptions","organizations_url":"https://api.github.com/users/HyukjinKwon/orgs","repos_url":"https://api.github.com/users/HyukjinKwon/repos","events_url":"https://api.github.com/users/HyukjinKwon/events{/privacy}","received_events_url":"https://api.github.com/users/HyukjinKwon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2016-12-29T09:06:37Z","updated_at":"2017-01-01T06:22:14Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/16433","html_url":"https://github.com/apache/spark/pull/16433","diff_url":"https://github.com/apache/spark/pull/16433.diff","patch_url":"https://github.com/apache/spark/pull/16433.patch"},"body":"## What changes were proposed in this pull request?\r\n\r\nThere are two tests failing on Windows due to the different newlines.\r\n\r\n```\r\n - StreamingQueryProgress - prettyJson *** FAILED *** (0 milliseconds)\r\n \"{\r\n    \"id\" : \"39788670-6722-48b7-a248-df6ba08722ac\",\r\n    \"runId\" : \"422282f1-3b81-4b47-a15d-82dda7e69390\",\r\n    \"name\" : \"myName\",\r\n    ...\r\n  }\" did not equal \"{\r\n    \"id\" : \"39788670-6722-48b7-a248-df6ba08722ac\",\r\n    \"runId\" : \"422282f1-3b81-4b47-a15d-82dda7e69390\",\r\n    \"name\" : \"myName\",\r\n    ...\r\n  }\"\r\n  ...\r\n```\r\n\r\n```\r\n - StreamingQueryStatus - prettyJson *** FAILED *** (0 milliseconds)\r\n \"{\r\n    \"message\" : \"active\",\r\n    \"isDataAvailable\" : true,\r\n    \"isTriggerActive\" : false\r\n  }\" did not equal \"{\r\n    \"message\" : \"active\",\r\n    \"isDataAvailable\" : true,\r\n    \"isTriggerActive\" : false\r\n  }\" \r\n  ...\r\n```\r\n\r\nThe reason is, `pretty` in `org.json4s.pretty` writes OS-dependent newlines but the string defined in the tests are `\\n`. This ends up with test failures.\r\n\r\nThis PR proposes to compare these regardless of newline concerns.\r\n\r\n## How was this patch tested?\r\n\r\nManually tested via AppVeyor.\r\n\r\n**Before**\r\nhttps://ci.appveyor.com/project/spark-test/spark/build/417-newlines-fix-before\r\n\r\n**After**\r\nhttps://ci.appveyor.com/project/spark-test/spark/build/418-newlines-fix"},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/269893504","html_url":"https://github.com/apache/spark/pull/16433#issuecomment-269893504","issue_url":"https://api.github.com/repos/apache/spark/issues/16433","id":269893504,"user":{"login":"HyukjinKwon","id":6477701,"avatar_url":"https://avatars.githubusercontent.com/u/6477701?v=3","gravatar_id":"","url":"https://api.github.com/users/HyukjinKwon","html_url":"https://github.com/HyukjinKwon","followers_url":"https://api.github.com/users/HyukjinKwon/followers","following_url":"https://api.github.com/users/HyukjinKwon/following{/other_user}","gists_url":"https://api.github.com/users/HyukjinKwon/gists{/gist_id}","starred_url":"https://api.github.com/users/HyukjinKwon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HyukjinKwon/subscriptions","organizations_url":"https://api.github.com/users/HyukjinKwon/orgs","repos_url":"https://api.github.com/users/HyukjinKwon/repos","events_url":"https://api.github.com/users/HyukjinKwon/events{/privacy}","received_events_url":"https://api.github.com/users/HyukjinKwon/received_events","type":"User","site_admin":false},"created_at":"2017-01-01T06:22:14Z","updated_at":"2017-01-01T06:22:14Z","body":"I just double checked. It seems `org.json4s.pretty` is being used in several places but they look for debugging purpose, printing purpose and making a request body (e.g., `StandaloneRestSubmitSuite`). So, for `org.json4s.pretty`, it seems these are only tests being failed due to this problem.\r\n\r\nAbout OS-dependent newline tests, I just checked the rest of them. I skimmed again the failed tests at my best and it seems these are only the tests being failed due to this problem."}}
{"actor":{"display_login":"HyukjinKwon"}}