{"action":"created","issue":{"url":"https://api.github.com/repos/LIS/LISAv2/issues/280","repository_url":"https://api.github.com/repos/LIS/LISAv2","labels_url":"https://api.github.com/repos/LIS/LISAv2/issues/280/labels{/name}","comments_url":"https://api.github.com/repos/LIS/LISAv2/issues/280/comments","events_url":"https://api.github.com/repos/LIS/LISAv2/issues/280/events","html_url":"https://github.com/LIS/LISAv2/pull/280","id":369806059,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIyNjUyNTUy","number":280,"title":"Filter unwanted string from jobOut, Fix #276","user":{"login":"santoshx","id":1633127,"node_id":"MDQ6VXNlcjE2MzMxMjc=","avatar_url":"https://avatars1.githubusercontent.com/u/1633127?v=4","gravatar_id":"","url":"https://api.github.com/users/santoshx","html_url":"https://github.com/santoshx","followers_url":"https://api.github.com/users/santoshx/followers","following_url":"https://api.github.com/users/santoshx/following{/other_user}","gists_url":"https://api.github.com/users/santoshx/gists{/gist_id}","starred_url":"https://api.github.com/users/santoshx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/santoshx/subscriptions","organizations_url":"https://api.github.com/users/santoshx/orgs","repos_url":"https://api.github.com/users/santoshx/repos","events_url":"https://api.github.com/users/santoshx/events{/privacy}","received_events_url":"https://api.github.com/users/santoshx/received_events","type":"User","site_admin":false},"labels":[{"id":934350580,"node_id":"MDU6TGFiZWw5MzQzNTA1ODA=","url":"https://api.github.com/repos/LIS/LISAv2/labels/bug","name":"bug","color":"d73a4a","default":true}],"state":"open","locked":false,"assignee":{"login":"santoshx","id":1633127,"node_id":"MDQ6VXNlcjE2MzMxMjc=","avatar_url":"https://avatars1.githubusercontent.com/u/1633127?v=4","gravatar_id":"","url":"https://api.github.com/users/santoshx","html_url":"https://github.com/santoshx","followers_url":"https://api.github.com/users/santoshx/followers","following_url":"https://api.github.com/users/santoshx/following{/other_user}","gists_url":"https://api.github.com/users/santoshx/gists{/gist_id}","starred_url":"https://api.github.com/users/santoshx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/santoshx/subscriptions","organizations_url":"https://api.github.com/users/santoshx/orgs","repos_url":"https://api.github.com/users/santoshx/repos","events_url":"https://api.github.com/users/santoshx/events{/privacy}","received_events_url":"https://api.github.com/users/santoshx/received_events","type":"User","site_admin":false},"assignees":[{"login":"santoshx","id":1633127,"node_id":"MDQ6VXNlcjE2MzMxMjc=","avatar_url":"https://avatars1.githubusercontent.com/u/1633127?v=4","gravatar_id":"","url":"https://api.github.com/users/santoshx","html_url":"https://github.com/santoshx","followers_url":"https://api.github.com/users/santoshx/followers","following_url":"https://api.github.com/users/santoshx/following{/other_user}","gists_url":"https://api.github.com/users/santoshx/gists{/gist_id}","starred_url":"https://api.github.com/users/santoshx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/santoshx/subscriptions","organizations_url":"https://api.github.com/users/santoshx/orgs","repos_url":"https://api.github.com/users/santoshx/repos","events_url":"https://api.github.com/users/santoshx/events{/privacy}","received_events_url":"https://api.github.com/users/santoshx/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/LIS/LISAv2/milestones/7","html_url":"https://github.com/LIS/LISAv2/milestone/7","labels_url":"https://api.github.com/repos/LIS/LISAv2/milestones/7/labels","id":3451077,"node_id":"MDk6TWlsZXN0b25lMzQ1MTA3Nw==","number":7,"title":"October - 2018","description":"","creator":{"login":"juhlee-microsoft","id":23069399,"node_id":"MDQ6VXNlcjIzMDY5Mzk5","avatar_url":"https://avatars3.githubusercontent.com/u/23069399?v=4","gravatar_id":"","url":"https://api.github.com/users/juhlee-microsoft","html_url":"https://github.com/juhlee-microsoft","followers_url":"https://api.github.com/users/juhlee-microsoft/followers","following_url":"https://api.github.com/users/juhlee-microsoft/following{/other_user}","gists_url":"https://api.github.com/users/juhlee-microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/juhlee-microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juhlee-microsoft/subscriptions","organizations_url":"https://api.github.com/users/juhlee-microsoft/orgs","repos_url":"https://api.github.com/users/juhlee-microsoft/repos","events_url":"https://api.github.com/users/juhlee-microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/juhlee-microsoft/received_events","type":"User","site_admin":false},"open_issues":13,"closed_issues":31,"state":"open","created_at":"2018-06-25T20:54:49Z","updated_at":"2018-10-15T16:50:25Z","due_on":"2018-10-31T07:00:00Z","closed_at":null},"comments":7,"created_at":"2018-10-13T14:14:42Z","updated_at":"2018-10-16T08:15:06Z","closed_at":null,"author_association":"COLLABORATOR","pull_request":{"url":"https://api.github.com/repos/LIS/LISAv2/pulls/280","html_url":"https://github.com/LIS/LISAv2/pull/280","diff_url":"https://github.com/LIS/LISAv2/pull/280.diff","patch_url":"https://github.com/LIS/LISAv2/pull/280.patch"},"body":"This filters out string \"[sudo] password for username: \" from jobOut"},"comment":{"url":"https://api.github.com/repos/LIS/LISAv2/issues/comments/430144180","html_url":"https://github.com/LIS/LISAv2/pull/280#issuecomment-430144180","issue_url":"https://api.github.com/repos/LIS/LISAv2/issues/280","id":430144180,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMDE0NDE4MA==","user":{"login":"santoshx","id":1633127,"node_id":"MDQ6VXNlcjE2MzMxMjc=","avatar_url":"https://avatars1.githubusercontent.com/u/1633127?v=4","gravatar_id":"","url":"https://api.github.com/users/santoshx","html_url":"https://github.com/santoshx","followers_url":"https://api.github.com/users/santoshx/followers","following_url":"https://api.github.com/users/santoshx/following{/other_user}","gists_url":"https://api.github.com/users/santoshx/gists{/gist_id}","starred_url":"https://api.github.com/users/santoshx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/santoshx/subscriptions","organizations_url":"https://api.github.com/users/santoshx/orgs","repos_url":"https://api.github.com/users/santoshx/repos","events_url":"https://api.github.com/users/santoshx/events{/privacy}","received_events_url":"https://api.github.com/users/santoshx/received_events","type":"User","site_admin":false},"created_at":"2018-10-16T08:15:06Z","updated_at":"2018-10-16T08:15:06Z","author_association":"COLLABORATOR","body":"> > > @santoshx\r\n> > > > 10/14/2018 11:27:05 : [INFO ] fdisk -l /dev/sdc 2> /dev/null | grep Disk | grep sdc | cut -f 5 -d ' ' executed successfully in 4.29 seconds.\r\n> > > > 10/14/2018 11:27:05 : [ERROR] EXCEPTION : VM ICA-HG-SingleVM-santoshx-DJHT-636752048029-role-0 sees a disk size of [sudo] password for : 1073741824, not the expected size of 1073741824 at line: 199\r\n> > > \r\n> > > \r\n> > > It looks like you are trying to match `[sudo] password for : 1073741824` string with `1073741824`.\r\n> > > But I'm wondering, how this can result in exception?\r\n> > > Please tell me which test case is this and how the string matching is done.\r\n> > \r\n> > \r\n> > @iamshital\r\n> > This is not a system exception.\r\n> > This exception is generated by my code when I don't get a expected string.\r\n> > ```\r\n> > \t$ret = RunLinuxCmd -ip $ip -port $port -username $user -password $password -command \"fdisk -l > /dev/null\" -runAsSudo\r\n> > \t$ret = RunLinuxCmd -ip $ip -port $port -username $user -password $password -command \"echo 1 > /sys/block/sdc/device/rescan\" -runAsSudo\r\n> > \t$diskSize = RunLinuxCmd -ip $ip -port $port -username $user -password $password -command \"fdisk -l /dev/sdc  2> /dev/null | grep Disk | grep sdc | cut -f 5 -d ' '\" -runAsSudo\r\n> > \tif (-not $diskSize) {\r\n> > \t\t$testResult = \"FAIL\"\r\n> > \t\tThrow \"Unable to determine disk size from within the guest after growing the VHDX\"\r\n> > \t}\r\n> > \r\n> > \tif ($diskSize -ne $newVhdxSize) {\r\n> > \t\t$testResult = \"FAIL\"\r\n> > \t\tThrow \"VM ${vmname} sees a disk size of ${diskSize}, not the expected size of ${newVhdxSize}\"\r\n> > \t}\r\n> > ```\r\n> \r\n> Thank you @santoshx . I'm approving this change.\r\n> But I will suggest you to change you test code and avoid throwing manual exceptions, if you can just handle them by if / else. You can exist using break / or other methods. But throwing exception is not a good choice.\r\n> \r\n> Exception creates confusion that something is broken.\r\n\r\nI did throw because I want to end my test at this failure and go into catch block and end the test as FAIL.\r\nHow could I go into catch block with a break?\r\n\r\n"}}
{"actor":{"display_login":"santoshx"}}