-
Bug
-
Resolution: Done
-
Low
-
Amsterdam Release
-
None
-
None
Junit test should not take more milliseconds to execute because there a thousands of them. If they take long to execute no one will be interested in running the tests. It will impact the feedback cycle. Builds will take too long.
The APPC build is now taking over an hour to build. When junit is tuned off the build just take about 5 minutes
Prevention:
ONAP maven build should be configured to abort and fail test that take longer than a reasonable amount of time. I suggest 1 second, but this is debatable. This prevents developers from submitting long running test in the first place.
http://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#forkedProcessTimeoutInSeconds
What could be fixed in APPC?:
Here is a list of high offenders in the appc build. These test should be either removed or refactored to run faster.
Running org.openecomp.appc.artifact.handler.dbservices.DBServiceTest
Tests run: 27, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 720.693 sec - in org.openecomp.appc.artifact.handler.dbservices.DBServiceTest
Running org.openecomp.appc.data.services.db.TestConfigResourceNode
Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 600.726 sec - in org.openecomp.appc.data.services.db.TestConfigResourceNode
Running org.openecomp.appc.flow.executor.node.FlowControlDBServiceTest
Running org.openecomp.appc.artifact.handler.node.ArtifactHandlerNodeTest
Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 300.061 sec - in org.openecomp.appc.artifact.handler.node.ArtifactHandlerNodeTest
Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 242.123 sec - in org.openecomp.appc.flow.executor.node.FlowControlDBServiceTest
Running org.openecomp.appc.flow.executor.node.FlowControlNodeTest
Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 180.165 sec - in org.openecomp.appc.flow.executor.node.FlowControlNodeTest
Running org.openecomp.appc.design.validator.TestDBService
Tests run: 16, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 60.957 sec - in org.openecomp.appc.design.validator.TestDBService
Running org.openecomp.appc.flow.executor.node.TestFlowExecutorNode
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 60.014 sec - in org.openecomp.appc.flow.executor.node.TestFlowExecutorNode
Running org.openecomp.appc.adapter.ssh.sshd.SshAdapterTest
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 12.977 sec - in org.openecomp.appc.adapter.ssh.sshd.SshAdapterTest
Running org.openecomp.appc.provider.AppcProviderLcmTest
Tests run: 29, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 12.732 sec - in org.openecomp.appc.provider.AppcProviderLcmTest
Running org.openecomp.appc.sdc.listener.SdcCallbackTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 10.771 sec - in org.openecomp.appc.sdc.listener.SdcCallbackTest
Notes as I make progress:
TestConfigResourceNode
-all tests seem to be expected to fail, since expected=exception.class is set
-each test waits the 60 minute timeout since there are no databases available
-tests seem useless
DBServiceTest
-some of the tests use a MockDBService and run in good time
-the rest have the same problem as above
-I replaced all DBServices with MockDBServices and they all work except testProcessSdcReferencesException()
FlowControlNodeTest
-a few of these tests are good
-the rest are the same expected to throw an exception after 60 seconds, as the above (testProcessFlow, testprocessFlowSequence,testgetDependencyInfo)
FlowControlDBServiceTest:
-same problem on most of tests (testGetDesignTimeFlowModel, testLoadSequenceIntoDB, testGetDependencyInfo, testGetCapabilitiesData)
TestDBService:
-this test had a missing property file
-now that the file is added, the test takes over 10 minutes instead of 60 seconds
-either way, the tests are broken
SshAdapterTest, AppcProviderLcmTest, SdcCallbackTest:
-these tests seem to be fine, they are just complicated and take a while
-they are not waiting on timeouts or anything like that