[TSDR-80] TSDRQueryandNBITest failing 500 error Created: 29/Jul/18  Updated: 29/Jul/18  Resolved: 29/Jul/18

Status: Resolved
Project: tsdr
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Medium
Reporter: Scott Melton Assignee: Scott Melton
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

   

Glassfish is returning status 500, internal server erro.

Anyone have a guess at why? The other tests like this do not fail.

This test was commented out and this ticket opened so we can fix the test.

@Test
    public void testQueryForMetrics()

{         String result = target("/metrics/query").queryParam("tsdrkey", "[NID=127.0.0.1]")                 .queryParam("from","0")                 .queryParam("until","" + Long.MAX_VALUE).request().get(String.class);         Assert.assertNotNull(result);         Assert.assertTrue(result.indexOf("NodeTest") != -1);     }

 Comments   
Comment by Scott Melton [ 29/Jul/18 ]

getMaxDataPoints() and getAggregation() return null if not applied.  The isEmpty() check was being executed on a null value.  Changed the checks back to != null, assuming that if they are there, then there is a value.  No need to check for a value if it is not null.

 

Uncommented the test that was causing this error.  The cause was introduced and fixed in this patch.

 https://git.opendaylight.org/gerrit/#/c/74556/

 

 

 

 

Generated at Wed Feb 07 20:46:20 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.