gemmellr commented on code in PR #4591: URL: https://github.com/apache/activemq-artemis/pull/4591#discussion_r1321303257
########## artemis-cli/src/main/java/org/apache/activemq/artemis/util/ServerUtil.java: ########## @@ -32,6 +32,7 @@ /** * A tool to let clients start, stop and kill Artemis servers + * this class is Deprecated: use the one from artemis-test-support Review Comment: Its not actually marked as deprecated though? If its considered so it should probably be, or else its more likely people could use the wrong one given the identical class name? Should add a full stop on first line and capitalise T in "this" to make the javadoc read better. Edit: Ah, perhaps as its used in various examples, which cant use the artemis-test-support one? In which case, is there actually real benefit to duplicating this class currently? ########## docs/user-manual/paging.adoc: ########## @@ -123,6 +123,11 @@ This tells what to do if the system is reaching `page-limit-bytes` or `page-limi | |=== + +[NOTE] + +When using the JDBC storage, page-size-bytes is maxed out by jdbc-max-page-size from the JDBC Storage configuration Review Comment: "page-size-bytes is maxed out by" -> "the effective page-size-bytes used is limited to a maximum of" ? ########## tests/db-tests/pom.xml: ########## @@ -0,0 +1,469 @@ +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.apache.activemq.tests</groupId> + <artifactId>artemis-tests-pom</artifactId> + <version>2.31.0-SNAPSHOT</version> + </parent> + + <artifactId>db-tests</artifactId> + <packaging>jar</packaging> + <name>Database Tests</name> + + <properties> + <activemq.basedir>${project.basedir}/../../</activemq.basedir> + <!-- note: I am passing these properties through command line as opposed to syste-properties on surefire as IntelijIDEA wouldn't pick up these properties automatically. It was the simplest way to make it work --> + <db-extra-args>-Dderby.load=${derby.load} -Dpostgres.load=${postgres.load} -Dpostgres.uri=${postgres.uri} -Dpostgres.class=${postgres.class} -Dmssql.load=${mssql.load} -Dmssql.uri=${mssql.uri} -Dmssql.class=${mssql.class} -Dmysql.load=${mysql.load} -Dmysql.uri=${mysql.uri} -Dmysql.class=${mysql.class} -Ddb2.load=${db2.load} -Ddb2.class=${db2.class} -Ddb2.uri=${db2.uri} -Doracle.load=${oracle.load} -Doracle.uri=${oracle.uri} -Doracle.class=${oracle.class}</db-extra-args> + <artemis-distribuiton-lib-dir>-Ddistribution.lib="${activemq.basedir}/artemis-distribution/target/apache-artemis-${project.version}-bin/apache-artemis-${project.version}/lib"</artemis-distribuiton-lib-dir> + + <derby.load>false</derby.load> + + <db2.load>false</db2.load> + <db2.uri>jdbc:db2://localhost:50000/artemis:user=db2inst1;password=artemis;</db2.uri> + <db2.class>com.ibm.db2.jcc.DB2Driver</db2.class> + + <mysql.load>false</mysql.load> + <mysql.uri>jdbc:mysql://localhost/ARTEMIS-TEST?user=root&#38;password=artemis</mysql.uri> + <mysql.class>com.mysql.cj.jdbc.Driver</mysql.class> + + <postgres.load>false</postgres.load> + <postgres.uri>jdbc:postgresql://localhost:5432/artemis?user=artemis&#38;password=artemis</postgres.uri> + <postgres.class>org.postgresql.Driver</postgres.class> + + <oracle.load>false</oracle.load> + <oracle.uri>jdbc:oracle:thin:system/artemis@localhost:1521:FREE</oracle.uri> + <oracle.class>oracle.jdbc.driver.OracleDriver</oracle.class> + + <mssql.load>false</mssql.load> + <mssql.uri>jdbc:sqlserver://localhost:1433;user=sa;password=ActiveMQ*Artemis</mssql.uri> + <mssql.class>com.microsoft.sqlserver.jdbc.SQLServerDriver</mssql.class> + + <skipDBTests>true</skipDBTests> + </properties> + + <dependencies> + <dependency> + <!-- this dependency is here to make sure this module is only executed + after the distribution is created. + Otherwise it will get here before the build eventually. + e.g if you use mvn install -T 20 --> + <groupId>org.apache.activemq</groupId> + <artifactId>apache-artemis</artifactId> + <version>${project.version}</version> + <scope>compile</scope> + <type>pom</type> + </dependency> + <dependency> + <groupId>org.apache.activemq</groupId> + <artifactId>artemis-server</artifactId> + <version>${project.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.activemq.tests</groupId> + <artifactId>artemis-test-support</artifactId> + <version>${project.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.activemq</groupId> + <artifactId>artemis-core-client</artifactId> + <version>${project.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.activemq</groupId> + <artifactId>artemis-jms-client</artifactId> + <version>${project.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.activemq</groupId> + <artifactId>artemis-commons</artifactId> + <version>${project.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.activemq</groupId> + <artifactId>artemis-cli</artifactId> + <version>${project.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.activemq</groupId> + <artifactId>artemis-journal</artifactId> + <version>${project.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>io.netty</groupId> + <artifactId>netty-common</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.jctools</groupId> + <artifactId>jctools-core</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.qpid</groupId> + <artifactId>qpid-jms-client</artifactId> + <scope>test</scope> + </dependency> + <!-- logging --> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-slf4j-impl</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>jakarta.jms</groupId> + <artifactId>jakarta.jms-api</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>jakarta.management.j2ee</groupId> + <artifactId>jakarta.management.j2ee-api</artifactId> + <scope>test</scope> + </dependency> + + <!-- The johnzon-core and json-api contents are repackaged in -commons, + However maven can still need them during tests, which run against + the original -commons classes when built+run in the same reactor, + and not the jar containing the shaded bits. --> + <dependency> + <groupId>org.apache.johnzon</groupId> + <artifactId>johnzon-core</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>jakarta.json</groupId> + <artifactId>jakarta.json-api</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.apache.activemq</groupId> + <artifactId>artemis-unit-test-support</artifactId> + <version>${project.version}</version> + <scope>test</scope> + </dependency> + + <!-- DB Test Deps --> + <dependency> + <groupId>org.apache.derby</groupId> + <artifactId>derby</artifactId> + <scope>test</scope> + </dependency> + + + </dependencies> + + <build> + <plugins> + <plugin> Review Comment: Inconsistent spacing and indentation (mix of 4 and 3) ########## tests/db-tests/pom.xml: ########## @@ -0,0 +1,469 @@ +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.apache.activemq.tests</groupId> + <artifactId>artemis-tests-pom</artifactId> + <version>2.31.0-SNAPSHOT</version> + </parent> + + <artifactId>db-tests</artifactId> + <packaging>jar</packaging> + <name>Database Tests</name> + + <properties> + <activemq.basedir>${project.basedir}/../../</activemq.basedir> + <!-- note: I am passing these properties through command line as opposed to syste-properties on surefire as IntelijIDEA wouldn't pick up these properties automatically. It was the simplest way to make it work --> + <db-extra-args>-Dderby.load=${derby.load} -Dpostgres.load=${postgres.load} -Dpostgres.uri=${postgres.uri} -Dpostgres.class=${postgres.class} -Dmssql.load=${mssql.load} -Dmssql.uri=${mssql.uri} -Dmssql.class=${mssql.class} -Dmysql.load=${mysql.load} -Dmysql.uri=${mysql.uri} -Dmysql.class=${mysql.class} -Ddb2.load=${db2.load} -Ddb2.class=${db2.class} -Ddb2.uri=${db2.uri} -Doracle.load=${oracle.load} -Doracle.uri=${oracle.uri} -Doracle.class=${oracle.class}</db-extra-args> + <artemis-distribuiton-lib-dir>-Ddistribution.lib="${activemq.basedir}/artemis-distribution/target/apache-artemis-${project.version}-bin/apache-artemis-${project.version}/lib"</artemis-distribuiton-lib-dir> Review Comment: typo: distribuiton ########## tests/db-tests/scripts/.gitignore: ########## @@ -0,0 +1,2 @@ +../../soak-tests/src/test/scripts/oradb Review Comment: this looks out of place (soak tests?) and possibly even incorrect..oradb? ########## docs/user-manual/persistence.adoc: ########## @@ -428,6 +431,9 @@ The maximal time offset between the broker and the database in milliseconds when Currently this value only affects the logging and will show a warning if the detected difference exceeds the limit. The default value is 250 milliseconds. +jdbc-max-page-size-bytes:: +The maximal size a page can use. The default and recommended maximum value is 100K bytes. Using larger sizes will encur into downloading large blobs what would affect performance when using paged messages. Review Comment: encur into -> result in what would -> that would ########## tests/db-tests/scripts/print-license.sh: ########## @@ -0,0 +1,28 @@ +#!/bin/sh +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +source ./container-define.sh + +echo "" +echo "*******************************************************************************************************************************" +echo " Notice:" +echo " This script is provided solely to assist you in running a $1 Free Database in a $CONTAINER_COMMAND environment," +echo " to facilitate development and testing, using an image provided by $2." +echo " By running this script, you agree to abide by all licensing terms issued by $2 for the $1 image being downloaded here." Review Comment: The module should probably have a readme that can note this _before_ someone enables a profile that runs 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]
