[SFC-193] Random NPE on SfcOpenflowUtilsTest unit test execution Created: 04/May/17  Updated: 29/May/18  Resolved: 29/May/18

Status: Verified
Project: sfc
Component/s: General
Affects Version/s: unspecified
Fix Version/s: Carbon

Type: Bug
Reporter: Diego Granados Assignee: Diego Granados
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


External issue ID: 8367

 Description   

NullPointerException randomly raised during unit test execution for sfc-openflow-utils. Caracteristic stack:

20:58:48 java.lang.NullPointerException
20:58:48 at junitparams.internal.ParameterisedTestMethodRunner.findChildForParams(ParameterisedTestMethodRunner.java:66)
20:58:48 at junitparams.internal.ParameterisedTestMethodRunner.runTestMethod(ParameterisedTestMethodRunner.java:40)
20:58:48 at junitparams.internal.ParameterisedTestClassRunner.runParameterisedTest(ParameterisedTestClassRunner.java:143)
20:58:48 at junitparams.JUnitParamsRunner.runChild(JUnitParamsRunner.java:393)



 Comments   
Comment by Diego Granados [ 04/May/17 ]

Error is triggered when the randomly generated input for test shouldThrowExceptionForCreateSetAction contains certain characters in the unicode private or unassigned ranges.

That input is generated randomly in method createActionSetDlBadParams; when using a test input generator, junit class ParameterisedTestMethod runner is used. In that class, a combination of test input + method name is stored (as String) in Description objects; the problem is that Description uses a regular expression for later separating test input / method name candidates which fails when test input contains certain unicode chars.

The expression used for extracting test input (first matched group is taken as test input):

private static final Pattern METHOD_AND_CLASS_NAME_PATTERN = Pattern
.compile("(.)\\((.)
)");

Problem is that this pattern fails when certain unicode chars in the private / unassigned range are present. Sanitizing test input to remove those chars solves the problem.

Comment by Brady Johnson [ 29/May/18 ]

This test case is no longer failing.

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