GitHub user conniey opened a pull request:

    https://github.com/apache/lucenenet/pull/172

    Removing/limiting uses of static variables and methods in Testcases

    This PR would allow an easier transition to using xUnit.  xUnit by default, 
runs its tests in parallel and asynchronously.  The current use of mutable 
static fields limits in test cases the ability to utilise this.
    
    * Changing existing static variables to static readonly so we are explicit 
that these variables are set once and do not change.
    * Change `OLD_FORMAT_IMPERSONATION_IS_ACTIVE` to non-static field since 
other tests share and use this variable
    * Change `ClassEnvRule` to non-static since every test class generates its 
own rule during test
    * Change dependent static methods in LuceneTestCase to non-static because 
their state depended on the state of these non-static variables

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/conniey/lucenenet staticLuceneTestCase

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/lucenenet/pull/172.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #172
    
----
commit 93acfd936b64d602e3e59d56c9d4b53e2820214b
Author: Connie Yau <[email protected]>
Date:   2016-07-11T23:33:47Z

    Changing static variables to static readonly

commit 655fa1a02f325551936c7b0388963b05204d296a
Author: Connie Yau <[email protected]>
Date:   2016-07-12T12:26:26Z

    Changing OLD_FORMAT_IMPERSONATION_IS_ACTIVE to non-static property

commit d0e3bfbb791ddd12eaf60bdc2a501df85a1c29d9
Author: Connie Yau <[email protected]>
Date:   2016-07-12T12:32:51Z

    Changing NewField methods to non-static

commit d45358a5faff8ab04a0613750684ba0ced992af6
Author: Connie Yau <[email protected]>
Date:   2016-07-12T14:06:47Z

    Fixing errors from making NewField and OLD_FORMAT_IMPERSONATION_IS_ACTIVE 
non-static

commit 6cc02fc6468dca463bfb2c63020f6ce377601638
Author: Connie Yau <[email protected]>
Date:   2016-07-12T14:13:53Z

    Making ClassEnvRule non-static

commit e757edfecd638bd1ec78a0175efec90b7e57d259
Author: Connie Yau <[email protected]>
Date:   2016-07-13T22:19:06Z

    Making NewSearcher to a non-static method

commit b94adfeb96f0c8ebe934ba37a89f16b68bb9dc8b
Author: Connie Yau <[email protected]>
Date:   2016-07-15T16:20:45Z

    Fixing test errors with teardown/setup

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to