gemmellr commented on a change in pull request #3924:
URL: https://github.com/apache/activemq-artemis/pull/3924#discussion_r790722908
##########
File path:
tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/server/config/JMSServerPropertyConfigTest.java
##########
@@ -78,7 +78,31 @@ public void testConfigViaBrokerPropertiesFromClasspath()
throws Exception {
server.setConfiguration(configuration);
server.start();
- assertEquals("ConfiguredViaProperties",
server.getActiveMQServer().getConfiguration().getName());
+ assertEquals(-2,
server.getActiveMQServer().getConfiguration().getGracefulShutdownTimeout());
Review comment:
Would be good to add a constant with/or comment to explain where the -2
comes from, will be very non-obvious later (isnt even that obvious now, until
the diff following later to explain it in a totally different file).
Should probably also assert that
ActiveMQDefaultConfiguration.getDefaultGracefulShutdownTimeout() isnt -2,
otherwise this test and the next one could be checking the same thing and not
really verifying that "server.setPropertiesResourcePath(null);" does anything.
(The tests are so similar they could also share a common impl and pass a
boolean to say whether to set the value and govern the expected result..might
make them more obvious).
##########
File path: tests/integration-tests/src/test/resources/broker.properties
##########
@@ -15,4 +15,6 @@
# limitations under the License.
#
-name=ConfiguredViaProperties
\ No newline at end of file
+# use a very innocuous bit of config b/c it will be picked up by all embedded
servers in the integration tests
Review comment:
If unit testing properly verified the file config is being picked up and
used as expected I dont see a real need for the integration test using the
actual default _broker.properties_ file, and especially not doing so for
_every_ integration test even though the broker doesnt provide a default file.
That just means the tests are _always_ going on a path that actual use
typically wont use. Would seem nicer to use a non-default file or only create
the file during the test that needs it.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]