{"action":"created","comment":{"url":"https://api.github.com/repos/bloomberg/lucene-solr/pulls/comments/78249098","id":78249098,"diff_hunk":"@@ -127,60 +127,121 @@ public void lambdaMartTestExplain() throws Exception {\n     System.out.println(restTestHarness.query(\"/query\" + query.toQueryString()));\n   }\n \n-  @Test(expected = ModelException.class)\n+  @Test\n   public void lambdaMartTestNoParams() throws Exception {\n-    createModelFromFiles(\"lambdamart_model_no_params.json\",\n-        \"lambdamart_features.json\");\n+    final ModelException expectedException = \n+        new ModelException(\"Model type does not exist org.apache.solr.ltr.ranking.LambdaMARTModel\");\n+    try {\n+        createModelFromFiles(\"lambdamart_model_no_params.json\",\n+              \"lambdamart_features.json\");\n+    } catch (ModelException actualException) {\n+      assertEquals(expectedException.toString(), actualException.toString());\n+    }\n \n   }\n \n-  @Test(expected = ModelException.class)\n+  @Test\n   public void lambdaMartTestNoTrees() throws Exception {\n-    createModelFromFiles(\"lambdamart_model_no_trees.json\",\n-        \"lambdamart_features.json\");\n+    final ModelException expectedException = \n+        new ModelException(\"Model type does not exist org.apache.solr.ltr.ranking.LambdaMARTModel\");\n+    try {\n+        createModelFromFiles(\"lambdamart_model_no_trees.json\",\n+            \"lambdamart_features.json\");\n+        fail(\"unexpectedly got here instead of catching \"+expectedException);\n+    } catch (ModelException actualException) {\n+      assertEquals(expectedException.toString(), actualException.toString());\n+    }\n   }\n \n-  @Test(expected = ModelException.class)\n+  @Test\n   public void lambdaMartTestNoWeight() throws Exception {\n-    createModelFromFiles(\"lambdamart_model_no_weight.json\",\n-        \"lambdamart_features.json\");\n+    final ModelException expectedException = \n+        new ModelException(\"Model type does not exist org.apache.solr.ltr.ranking.LambdaMARTModel\");\n+    try {\n+        createModelFromFiles(\"lambdamart_model_no_weight.json\",\n+            \"lambdamart_features.json\");\n+        fail(\"unexpectedly got here instead of catching \"+expectedException);\n+    } catch (ModelException actualException) {\n+      assertEquals(expectedException.toString(), actualException.toString());\n+    }\n   }\n \n-  @Test(expected = ModelException.class)\n+  @Test\n   public void lambdaMartTestNoTree() throws Exception {\n-    createModelFromFiles(\"lambdamart_model_no_tree.json\",\n-        \"lambdamart_features.json\");\n+    final ModelException expectedException = \n+        new ModelException(\"Model type does not exist org.apache.solr.ltr.ranking.LambdaMARTModel\");\n+    try {\n+        createModelFromFiles(\"lambdamart_model_no_tree.json\",\n+            \"lambdamart_features.json\");\n+        fail(\"unexpectedly got here instead of catching \"+expectedException);\n+    } catch (ModelException actualException) {\n+      assertEquals(expectedException.toString(), actualException.toString());\n+    }\n   }\n \n-  @Test(expected = SolrException.class)\n+  @Test\n   public void lambdaMartTestNoFeatures() throws Exception {\n-    createModelFromFiles(\"lambdamart_model_no_features.json\",\n-        \"lambdamart_features.json\");\n+    final SolrException expectedException = \n+        new SolrException(SolrException.ErrorCode.BAD_REQUEST,\n+            \"Missing mandatory field features\");\n+    try {\n+        createModelFromFiles(\"lambdamart_model_no_features.json\",\n+            \"lambdamart_features.json\");\n+        fail(\"unexpectedly got here instead of catching \"+expectedException);\n+    } catch (SolrException actualException) {\n+      assertEquals(expectedException.toString(), actualException.toString());\n+    }\n   }\n \n-  @Test(expected = ModelException.class)\n+  @Test\n   public void lambdaMartTestNoRight() throws Exception {\n-    createModelFromFiles(\"lambdamart_model_no_right.json\",\n-        \"lambdamart_features.json\");\n-\n+    final ModelException expectedException = \n+        new ModelException(\"Model type does not exist org.apache.solr.ltr.ranking.LambdaMARTModel\");\n+    try {\n+        createModelFromFiles(\"lambdamart_model_no_right.json\",\n+            \"lambdamart_features.json\");\n+        fail(\"unexpectedly got here instead of catching \"+expectedException);\n+    } catch (ModelException actualException) {\n+      assertEquals(expectedException.toString(), actualException.toString());\n+    }\n   }\n \n-  @Test(expected = ModelException.class)\n+  @Test\n   public void lambdaMartTestNoLeft() throws Exception {\n-    createModelFromFiles(\"lambdamart_model_no_left.json\",\n-        \"lambdamart_features.json\");\n+    final ModelException expectedException = \n+        new ModelException(\"Model type does not exist org.apache.solr.ltr.ranking.LambdaMARTModel\");\n+    try {\n+        createModelFromFiles(\"lambdamart_model_no_left.json\",\n+            \"lambdamart_features.json\");\n+        fail(\"unexpectedly got here instead of catching \"+expectedException);","path":"solr/contrib/ltr/src/test/org/apache/solr/ltr/feature/impl/TestLambdaMARTModel.java","position":112,"original_position":112,"commit_id":"9021a2ba60ec1f2786e3ff3b864366d4d6feaf95","original_commit_id":"9021a2ba60ec1f2786e3ff3b864366d4d6feaf95","user":{"login":"jrpantony","id":16672492,"avatar_url":"https://avatars.githubusercontent.com/u/16672492?v=3","gravatar_id":"","url":"https://api.github.com/users/jrpantony","html_url":"https://github.com/jrpantony","followers_url":"https://api.github.com/users/jrpantony/followers","following_url":"https://api.github.com/users/jrpantony/following{/other_user}","gists_url":"https://api.github.com/users/jrpantony/gists{/gist_id}","starred_url":"https://api.github.com/users/jrpantony/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrpantony/subscriptions","organizations_url":"https://api.github.com/users/jrpantony/orgs","repos_url":"https://api.github.com/users/jrpantony/repos","events_url":"https://api.github.com/users/jrpantony/events{/privacy}","received_events_url":"https://api.github.com/users/jrpantony/received_events","type":"User","site_admin":false},"body":"make better msg","created_at":"2016-09-09T21:05:41Z","updated_at":"2016-09-09T21:05:41Z","html_url":"https://github.com/bloomberg/lucene-solr/pull/71#discussion_r78249098","pull_request_url":"https://api.github.com/repos/bloomberg/lucene-solr/pulls/71","_links":{"self":{"href":"https://api.github.com/repos/bloomberg/lucene-solr/pulls/comments/78249098"},"html":{"href":"https://github.com/bloomberg/lucene-solr/pull/71#discussion_r78249098"},"pull_request":{"href":"https://api.github.com/repos/bloomberg/lucene-solr/pulls/71"}}},"pull_request":{"url":"https://api.github.com/repos/bloomberg/lucene-solr/pulls/71","id":84185147,"html_url":"https://github.com/bloomberg/lucene-solr/pull/71","diff_url":"https://github.com/bloomberg/lucene-solr/pull/71.diff","patch_url":"https://github.com/bloomberg/lucene-solr/pull/71.patch","issue_url":"https://api.github.com/repos/bloomberg/lucene-solr/issues/71","number":71,"state":"open","locked":false,"title":"explicit tests","user":{"login":"jdorando","id":6546844,"avatar_url":"https://avatars.githubusercontent.com/u/6546844?v=3","gravatar_id":"","url":"https://api.github.com/users/jdorando","html_url":"https://github.com/jdorando","followers_url":"https://api.github.com/users/jdorando/followers","following_url":"https://api.github.com/users/jdorando/following{/other_user}","gists_url":"https://api.github.com/users/jdorando/gists{/gist_id}","starred_url":"https://api.github.com/users/jdorando/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdorando/subscriptions","organizations_url":"https://api.github.com/users/jdorando/orgs","repos_url":"https://api.github.com/users/jdorando/repos","events_url":"https://api.github.com/users/jdorando/events{/privacy}","received_events_url":"https://api.github.com/users/jdorando/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-09-06T19:52:47Z","updated_at":"2016-09-09T21:05:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4c49d60b342514142459673ef400203474f6d48e","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/bloomberg/lucene-solr/pulls/71/commits","review_comments_url":"https://api.github.com/repos/bloomberg/lucene-solr/pulls/71/comments","review_comment_url":"https://api.github.com/repos/bloomberg/lucene-solr/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bloomberg/lucene-solr/issues/71/comments","statuses_url":"https://api.github.com/repos/bloomberg/lucene-solr/statuses/9021a2ba60ec1f2786e3ff3b864366d4d6feaf95","head":{"label":"jdorando:testfix","ref":"testfix","sha":"9021a2ba60ec1f2786e3ff3b864366d4d6feaf95","user":{"login":"jdorando","id":6546844,"avatar_url":"https://avatars.githubusercontent.com/u/6546844?v=3","gravatar_id":"","url":"https://api.github.com/users/jdorando","html_url":"https://github.com/jdorando","followers_url":"https://api.github.com/users/jdorando/followers","following_url":"https://api.github.com/users/jdorando/following{/other_user}","gists_url":"https://api.github.com/users/jdorando/gists{/gist_id}","starred_url":"https://api.github.com/users/jdorando/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdorando/subscriptions","organizations_url":"https://api.github.com/users/jdorando/orgs","repos_url":"https://api.github.com/users/jdorando/repos","events_url":"https://api.github.com/users/jdorando/events{/privacy}","received_events_url":"https://api.github.com/users/jdorando/received_events","type":"User","site_admin":false},"repo":{"id":64762664,"name":"lucene-solr","full_name":"jdorando/lucene-solr","owner":{"login":"jdorando","id":6546844,"avatar_url":"https://avatars.githubusercontent.com/u/6546844?v=3","gravatar_id":"","url":"https://api.github.com/users/jdorando","html_url":"https://github.com/jdorando","followers_url":"https://api.github.com/users/jdorando/followers","following_url":"https://api.github.com/users/jdorando/following{/other_user}","gists_url":"https://api.github.com/users/jdorando/gists{/gist_id}","starred_url":"https://api.github.com/users/jdorando/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdorando/subscriptions","organizations_url":"https://api.github.com/users/jdorando/orgs","repos_url":"https://api.github.com/users/jdorando/repos","events_url":"https://api.github.com/users/jdorando/events{/privacy}","received_events_url":"https://api.github.com/users/jdorando/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jdorando/lucene-solr","description":"Mirror of Apache Lucene + Solr","fork":true,"url":"https://api.github.com/repos/jdorando/lucene-solr","forks_url":"https://api.github.com/repos/jdorando/lucene-solr/forks","keys_url":"https://api.github.com/repos/jdorando/lucene-solr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jdorando/lucene-solr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jdorando/lucene-solr/teams","hooks_url":"https://api.github.com/repos/jdorando/lucene-solr/hooks","issue_events_url":"https://api.github.com/repos/jdorando/lucene-solr/issues/events{/number}","events_url":"https://api.github.com/repos/jdorando/lucene-solr/events","assignees_url":"https://api.github.com/repos/jdorando/lucene-solr/assignees{/user}","branches_url":"https://api.github.com/repos/jdorando/lucene-solr/branches{/branch}","tags_url":"https://api.github.com/repos/jdorando/lucene-solr/tags","blobs_url":"https://api.github.com/repos/jdorando/lucene-solr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jdorando/lucene-solr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jdorando/lucene-solr/git/refs{/sha}","trees_url":"https://api.github.com/repos/jdorando/lucene-solr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jdorando/lucene-solr/statuses/{sha}","languages_url":"https://api.github.com/repos/jdorando/lucene-solr/languages","stargazers_url":"https://api.github.com/repos/jdorando/lucene-solr/stargazers","contributors_url":"https://api.github.com/repos/jdorando/lucene-solr/contributors","subscribers_url":"https://api.github.com/repos/jdorando/lucene-solr/subscribers","subscription_url":"https://api.github.com/repos/jdorando/lucene-solr/subscription","commits_url":"https://api.github.com/repos/jdorando/lucene-solr/commits{/sha}","git_commits_url":"https://api.github.com/repos/jdorando/lucene-solr/git/commits{/sha}","comments_url":"https://api.github.com/repos/jdorando/lucene-solr/comments{/number}","issue_comment_url":"https://api.github.com/repos/jdorando/lucene-solr/issues/comments{/number}","contents_url":"https://api.github.com/repos/jdorando/lucene-solr/contents/{+path}","compare_url":"https://api.github.com/repos/jdorando/lucene-solr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jdorando/lucene-solr/merges","archive_url":"https://api.github.com/repos/jdorando/lucene-solr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jdorando/lucene-solr/downloads","issues_url":"https://api.github.com/repos/jdorando/lucene-solr/issues{/number}","pulls_url":"https://api.github.com/repos/jdorando/lucene-solr/pulls{/number}","milestones_url":"https://api.github.com/repos/jdorando/lucene-solr/milestones{/number}","notifications_url":"https://api.github.com/repos/jdorando/lucene-solr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jdorando/lucene-solr/labels{/name}","releases_url":"https://api.github.com/repos/jdorando/lucene-solr/releases{/id}","deployments_url":"https://api.github.com/repos/jdorando/lucene-solr/deployments","created_at":"2016-08-02T14:13:41Z","updated_at":"2016-08-02T14:14:14Z","pushed_at":"2016-09-09T19:19:34Z","git_url":"git://github.com/jdorando/lucene-solr.git","ssh_url":"git@github.com:jdorando/lucene-solr.git","clone_url":"https://github.com/jdorando/lucene-solr.git","svn_url":"https://github.com/jdorando/lucene-solr","homepage":null,"size":423999,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"bloomberg:master-ltr-plugin-develop","ref":"master-ltr-plugin-develop","sha":"67533ec391df3ad11e9156d38f0f7bde356e7cee","user":{"login":"bloomberg","id":1416818,"avatar_url":"https://avatars.githubusercontent.com/u/1416818?v=3","gravatar_id":"","url":"https://api.github.com/users/bloomberg","html_url":"https://github.com/bloomberg","followers_url":"https://api.github.com/users/bloomberg/followers","following_url":"https://api.github.com/users/bloomberg/following{/other_user}","gists_url":"https://api.github.com/users/bloomberg/gists{/gist_id}","starred_url":"https://api.github.com/users/bloomberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bloomberg/subscriptions","organizations_url":"https://api.github.com/users/bloomberg/orgs","repos_url":"https://api.github.com/users/bloomberg/repos","events_url":"https://api.github.com/users/bloomberg/events{/privacy}","received_events_url":"https://api.github.com/users/bloomberg/received_events","type":"Organization","site_admin":false},"repo":{"id":50526942,"name":"lucene-solr","full_name":"bloomberg/lucene-solr","owner":{"login":"bloomberg","id":1416818,"avatar_url":"https://avatars.githubusercontent.com/u/1416818?v=3","gravatar_id":"","url":"https://api.github.com/users/bloomberg","html_url":"https://github.com/bloomberg","followers_url":"https://api.github.com/users/bloomberg/followers","following_url":"https://api.github.com/users/bloomberg/following{/other_user}","gists_url":"https://api.github.com/users/bloomberg/gists{/gist_id}","starred_url":"https://api.github.com/users/bloomberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bloomberg/subscriptions","organizations_url":"https://api.github.com/users/bloomberg/orgs","repos_url":"https://api.github.com/users/bloomberg/repos","events_url":"https://api.github.com/users/bloomberg/events{/privacy}","received_events_url":"https://api.github.com/users/bloomberg/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bloomberg/lucene-solr","description":"Mirror of Apache Lucene + Solr","fork":true,"url":"https://api.github.com/repos/bloomberg/lucene-solr","forks_url":"https://api.github.com/repos/bloomberg/lucene-solr/forks","keys_url":"https://api.github.com/repos/bloomberg/lucene-solr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bloomberg/lucene-solr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bloomberg/lucene-solr/teams","hooks_url":"https://api.github.com/repos/bloomberg/lucene-solr/hooks","issue_events_url":"https://api.github.com/repos/bloomberg/lucene-solr/issues/events{/number}","events_url":"https://api.github.com/repos/bloomberg/lucene-solr/events","assignees_url":"https://api.github.com/repos/bloomberg/lucene-solr/assignees{/user}","branches_url":"https://api.github.com/repos/bloomberg/lucene-solr/branches{/branch}","tags_url":"https://api.github.com/repos/bloomberg/lucene-solr/tags","blobs_url":"https://api.github.com/repos/bloomberg/lucene-solr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bloomberg/lucene-solr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bloomberg/lucene-solr/git/refs{/sha}","trees_url":"https://api.github.com/repos/bloomberg/lucene-solr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bloomberg/lucene-solr/statuses/{sha}","languages_url":"https://api.github.com/repos/bloomberg/lucene-solr/languages","stargazers_url":"https://api.github.com/repos/bloomberg/lucene-solr/stargazers","contributors_url":"https://api.github.com/repos/bloomberg/lucene-solr/contributors","subscribers_url":"https://api.github.com/repos/bloomberg/lucene-solr/subscribers","subscription_url":"https://api.github.com/repos/bloomberg/lucene-solr/subscription","commits_url":"https://api.github.com/repos/bloomberg/lucene-solr/commits{/sha}","git_commits_url":"https://api.github.com/repos/bloomberg/lucene-solr/git/commits{/sha}","comments_url":"https://api.github.com/repos/bloomberg/lucene-solr/comments{/number}","issue_comment_url":"https://api.github.com/repos/bloomberg/lucene-solr/issues/comments{/number}","contents_url":"https://api.github.com/repos/bloomberg/lucene-solr/contents/{+path}","compare_url":"https://api.github.com/repos/bloomberg/lucene-solr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bloomberg/lucene-solr/merges","archive_url":"https://api.github.com/repos/bloomberg/lucene-solr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bloomberg/lucene-solr/downloads","issues_url":"https://api.github.com/repos/bloomberg/lucene-solr/issues{/number}","pulls_url":"https://api.github.com/repos/bloomberg/lucene-solr/pulls{/number}","milestones_url":"https://api.github.com/repos/bloomberg/lucene-solr/milestones{/number}","notifications_url":"https://api.github.com/repos/bloomberg/lucene-solr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bloomberg/lucene-solr/labels{/name}","releases_url":"https://api.github.com/repos/bloomberg/lucene-solr/releases{/id}","deployments_url":"https://api.github.com/repos/bloomberg/lucene-solr/deployments","created_at":"2016-01-27T18:02:47Z","updated_at":"2016-08-26T18:15:05Z","pushed_at":"2016-09-09T19:19:11Z","git_url":"git://github.com/bloomberg/lucene-solr.git","ssh_url":"git@github.com:bloomberg/lucene-solr.git","clone_url":"https://github.com/bloomberg/lucene-solr.git","svn_url":"https://github.com/bloomberg/lucene-solr","homepage":null,"size":443400,"stargazers_count":15,"watchers_count":15,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":5,"forks":13,"open_issues":5,"watchers":15,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bloomberg/lucene-solr/pulls/71"},"html":{"href":"https://github.com/bloomberg/lucene-solr/pull/71"},"issue":{"href":"https://api.github.com/repos/bloomberg/lucene-solr/issues/71"},"comments":{"href":"https://api.github.com/repos/bloomberg/lucene-solr/issues/71/comments"},"review_comments":{"href":"https://api.github.com/repos/bloomberg/lucene-solr/pulls/71/comments"},"review_comment":{"href":"https://api.github.com/repos/bloomberg/lucene-solr/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bloomberg/lucene-solr/pulls/71/commits"},"statuses":{"href":"https://api.github.com/repos/bloomberg/lucene-solr/statuses/9021a2ba60ec1f2786e3ff3b864366d4d6feaf95"}}}}
{"actor":{"display_login":"jrpantony"}}