Skip to content

Commit

Permalink
Fix PlainOsgiTest
Browse files Browse the repository at this point in the history
This test has recently started failing after the PR
#3089
got merged. 

With the below exception

org.ops4j.pax.exam.TestContainerException: java.lang.IllegalArgumentException: Can not set java.util.List field org.testng.internal.NoOpTestClass.m_beforeTestMethods to [Lorg.testng.ITestNGMethod;

This PR changes the type of a field
Which was previously an array to a list.

The PaxExam listener is making 
Use of reflection to access the data member 
“m_beforeTestMethods” instead of it just using
The “setter” that is part of NoOpTestClass.

Since this library is being used ONLY for test and 
Since the library in question seems to be something
That is not updated for quite sometime, resorting 
to class path overriding wherein we duplicate the 
Same class into TestNG codebase and then fix the 
Problem locally so that the tests will pass.
  • Loading branch information
krmahadevan committed Mar 21, 2024
1 parent 69dc232 commit cb0c311
Showing 1 changed file with 499 additions and 0 deletions.
Loading

0 comments on commit cb0c311

Please sign in to comment.