-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP for #3111 #4
base: fix/3111
Are you sure you want to change the base?
Conversation
@krmahadevan I'm trying to replace I think the tests are currently failing because test methods are not always found (an |
@juherr - Replacing So why would we want to try and unify this functionality? We have also tried to alter this interface without adding default implementation (not a major concern and easily fixable), but doing this will cause backward compatibility loss. We are also always assuming that |
@krmahadevan Thanks for your feedbacks.
Agree. I was looking for a structure that hosts the meta-data of an instance. I didn't remember that
It was not an objective. I need to think deeper since you pointed me to the previous discussion.
Ok.
I disagree with that. "no parameters" means the collection of parameters is empty. |
In fact, I've already said something close the last time: testng-team/testng-team.github.io#70 (comment) |
This guarantee is being provided by the implementation and not by the interface. |
Yes, agree. But using Optional will not assure that implementation won't return |
BTW, if you have some free time, I'm open to help because I haven't found yet where is the issue into my branch :( |
I will spend sometime tomorrow and find out what is going on in this branch. |
I think the issues come from missing The main goal is not to merge the changes but to have a clear view of what should be done. About the conceptual model, my current point of view is that every instance should be created by a factory (maybe virtual or implicit) that has parameters from a dataprovider (maybe virtual or implicit). Possible alternative that is maybe closer to the current implementation: |
Are you talking about the existing changes that exist in Either ways, I think we are trying to skin the cat in one shot which perhaps doesnt work. I say this based on my past experiences in terms of refactoring within TestNG (Getting rid of the GraphThreadPoolExecutor and paving the way to working with plain vanilla thread pool executors and also allowing users to work with shared thread pool is IMO a big example of this). We should do it in phases. The immediate problem/concern at hand is how do we expose the required stuff to the end users without having to change the functionality/signature/user experience (whatever we want to call it). The second thing is, so should I try and spend time on figuring out what the failures are, or are you saying that this is to be used as a reference implementation to give an idea on where we want to be in the near future. I am a bit confused. |
Sorry. I'm talking about my changes in the current PR. The way to not break the current interface will not be a big deal because we can easily add a new method instead of using the actual My latest comment was about my current understanding of the model that should be implemented. I'm pretty sure the code is already there but not located at the best place. |
@juherr - I spent sometime looking at the changeset. Here's what I feel
Once both these are done, I think the tests would start passing. I also felt that perhaps this changeset can be in a new branch (since I don't see it share much with what I had in my PR except for the interface that I introduced). |
I strongly feel that we should deprecate camouflaging the |
Ok. I will cleanup |
Done. Current status: |
@@ -29,10 +29,10 @@ class TestClass extends NoOpTestClass implements ITestClass, ITestClassConfigInf | |||
private final ITestObjectFactory objectFactory; | |||
private final String m_errorMsgPrefix; | |||
|
|||
private final IdentityHashMap<Object, List<ITestNGMethod>> beforeClassConfig = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think issues are here because equals/hashcode are maybe not well implemented
@juherr - I think that the changes you have introduced are a bit invasive (they are subtle and so they were hard to spot). I have spent time reverting the changes (the blast radius in my opinion is too large). I have reduced the failures to
I think its better you start this again, but this time keep the changes to literally only a find and replace (apart from adopting your proposed model). I think that would be a lot more easier. |
FYI
Current status: tests are failing