You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by "DomGarguilo (via GitHub)" <gi...@apache.org> on 2025/03/07 18:25:36 UTC
[PR] Fix WebViewsIT [accumulo]
DomGarguilo opened a new pull request, #5388:
URL: https://github.com/apache/accumulo/pull/5388
In #5351 the URL parameter to request a page for a specific table changed from `tableID` to `tableId`. This PR updates the IT to the correct expected param `tableId`.
I also took this opportunity to make one var final in the test and remove an exception that wasn't being thrown.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix WebViewsIT [accumulo]
Posted by "DomGarguilo (via GitHub)" <gi...@apache.org>.
DomGarguilo commented on code in PR #5388:
URL: https://github.com/apache/accumulo/pull/5388#discussion_r1987902336
##########
server/monitor/src/test/java/org/apache/accumulo/monitor/it/WebViewsIT.java:
##########
@@ -123,18 +123,17 @@ public void testGetTablesConstraintViolations() {
* a registered MessageBodyWriter capable of serializing/writing the object returned from your
* endpoint. We're using a simple stubbed out inner class HashMapWriter for this.
*
- * @throws Exception not expected
*/
@Test
- public void testGetTablesConstraintPassing() throws Exception {
+ public void testGetTablesConstraintPassing() {
// Using the mocks we can verify that the getModel method gets called via debugger
// however it's difficult to continue to mock through the jersey MVC code for the properly built
// response.
// Our silly HashMapWriter registered in the configure method gets wired in and used here.
Response output = target("tables/foo").request().get();
assertEquals(200, output.getStatus(), "should return status 200");
String responseBody = output.readEntity(String.class);
- assertTrue(responseBody.contains("tableID=foo") && responseBody.contains("table=bar"));
+ assertTrue(responseBody.contains("tableId=foo") && responseBody.contains("table=bar"));
Review Comment:
Created #5394 to track this.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix WebViewsIT [accumulo]
Posted by "DomGarguilo (via GitHub)" <gi...@apache.org>.
DomGarguilo commented on code in PR #5388:
URL: https://github.com/apache/accumulo/pull/5388#discussion_r1987884068
##########
server/monitor/src/test/java/org/apache/accumulo/monitor/it/WebViewsIT.java:
##########
@@ -123,18 +123,17 @@ public void testGetTablesConstraintViolations() {
* a registered MessageBodyWriter capable of serializing/writing the object returned from your
* endpoint. We're using a simple stubbed out inner class HashMapWriter for this.
*
- * @throws Exception not expected
*/
@Test
- public void testGetTablesConstraintPassing() throws Exception {
+ public void testGetTablesConstraintPassing() {
// Using the mocks we can verify that the getModel method gets called via debugger
// however it's difficult to continue to mock through the jersey MVC code for the properly built
// response.
// Our silly HashMapWriter registered in the configure method gets wired in and used here.
Response output = target("tables/foo").request().get();
assertEquals(200, output.getStatus(), "should return status 200");
String responseBody = output.readEntity(String.class);
- assertTrue(responseBody.contains("tableID=foo") && responseBody.contains("table=bar"));
+ assertTrue(responseBody.contains("tableId=foo") && responseBody.contains("table=bar"));
Review Comment:
Yea I was thinking about this too. It seems like a good improvement. It would probably be helpful and make the code safer but would be a lot more changes. I'll merge this PR to get the test passing in the build and then create a follow on to add constants for all of the parameters in this category.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix WebViewsIT [accumulo]
Posted by "DomGarguilo (via GitHub)" <gi...@apache.org>.
DomGarguilo merged PR #5388:
URL: https://github.com/apache/accumulo/pull/5388
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix WebViewsIT [accumulo]
Posted by "keith-turner (via GitHub)" <gi...@apache.org>.
keith-turner commented on code in PR #5388:
URL: https://github.com/apache/accumulo/pull/5388#discussion_r1985709336
##########
server/monitor/src/test/java/org/apache/accumulo/monitor/it/WebViewsIT.java:
##########
@@ -123,18 +123,17 @@ public void testGetTablesConstraintViolations() {
* a registered MessageBodyWriter capable of serializing/writing the object returned from your
* endpoint. We're using a simple stubbed out inner class HashMapWriter for this.
*
- * @throws Exception not expected
*/
@Test
- public void testGetTablesConstraintPassing() throws Exception {
+ public void testGetTablesConstraintPassing() {
// Using the mocks we can verify that the getModel method gets called via debugger
// however it's difficult to continue to mock through the jersey MVC code for the properly built
// response.
// Our silly HashMapWriter registered in the configure method gets wired in and used here.
Response output = target("tables/foo").request().get();
assertEquals(200, output.getStatus(), "should return status 200");
String responseBody = output.readEntity(String.class);
- assertTrue(responseBody.contains("tableID=foo") && responseBody.contains("table=bar"));
+ assertTrue(responseBody.contains("tableId=foo") && responseBody.contains("table=bar"));
Review Comment:
could a constant be used for `tableId`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@accumulo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org