Skip to content
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

Streamline native injection w.r.t cloning #2001

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Jan 8, 2019

  1. Streamline native injection w.r.t cloning

    Closes testng-team#1994
    
    Currently as part of supporting native injection
    TestNG resorts to invoking the “clone()” method 
    on the parameter being natively injected.
    
    This becomes a problem because XmlTest is the only
    internal TestNG object that implements the Cloneable
    interface wherein it resorts to something like a deep
    copy and adds the cloned instance to the XmlSuite.
    
    This causes a lot of phony XmlTest objects to be 
    added up to the suite and causes issues as detailed
    in the bug.
    
    Fixed this by introducing a marker interface to 
    indicate to TestNG to skip cloning and use the object
    as is. Annotated “XmlTest” with this annotation 
    so that we dont clone xmltest but instead use it 
    as is.
    
    Yes this will expose the XmlTest object, but its 
    already exposed to the end user via various different
    means. So I guess we are ok here.
    krmahadevan committed Jan 8, 2019
    Configuration menu
    Copy the full SHA
    fa4d026 View commit details
    Browse the repository at this point in the history