[ 
https://issues.apache.org/jira/browse/GEODE-8032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17094006#comment-17094006
 ] 

ASF GitHub Bot commented on GEODE-8032:
---------------------------------------

kirklund opened a new pull request #5011:
URL: https://github.com/apache/geode/pull/5011


   I found 3 tests named *IntegrationTests in src/test that need to move:
   * 
geode-core/src/test/java/org/apache/geode/distributed/internal/InternalDistributedSystemIntegrationTest.java
   * 
geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/v1/operations/OqlQueryRequestOperationHandlerIntegrationTest.java*
 
geode-wan/src/test/java/org/apache/geode/internal/cache/wan/GatewaySenderEventRemoteDispatcherIntegrationTest.java
   
   These are unit tests that are better off renamed and moved to 
src/integrationTest because they touch several Geode classes including 
singletons:* 
geode-core/src/test/java/org/apache/geode/distributed/internal/InternalLocatorTest.java*
 
geode-core/src/test/java/org/apache/geode/distributed/internal/locks/DLockServiceJUnitTest.java
   
   This one creates a full DistributedSystem stack so it belongs in 
src/integrationTest:* 
geode-core/src/test/java/org/apache/geode/distributed/internal/InternalDistributedSystemTest.java
   
   And these unit tests create a full Cache stack so they belong in 
src/integrationTest:* 
geode-lucene/src/test/java/org/apache/geode/cache/lucene/FlatFormatPdxSerializerJunitTest.java*
 
geode-protobuf/src/test/java/org/apache/geode/internal/protocol/protobuf/v1/serialization/codec/JsonPdxConverterJUnitTest.java
   
   And one last unit test that I was able to fix -- this test creates a spy to 
test as a partial mock with a common goof that results in a full Cache being 
created and then not used by the test:* 
extensions/geode-modules/src/test/java/org/apache/geode/modules/util/BootstrappingFunctionTest.java
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


> Unit tests should not pollute the environment
> ---------------------------------------------
>
>                 Key: GEODE-8032
>                 URL: https://issues.apache.org/jira/browse/GEODE-8032
>             Project: Geode
>          Issue Type: Bug
>          Components: tests
>            Reporter: Kirk Lund
>            Assignee: Kirk Lund
>            Priority: Major
>
> Unit tests should not pollute the environment.
> From https://www.artima.com/weblogs/viewpost.jsp?thread=126923:
> A test is not a unit test if:
> * It talks to the database
> * It communicates across the network
> * It touches the file system
> * It can't run at the same time as any of your other unit tests
> * You have to do special things to your environment (such as editing config 
> files) to run it.
> Tests that do these things are good but they should be an integration or 
> system test instead of a unit test.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to