Skip to content

Commit

Permalink
ADD build test with memory pressure (#323)
Browse files Browse the repository at this point in the history
  • Loading branch information
vharseko authored Feb 6, 2024
1 parent 28ef711 commit 84db4e5
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
- name: Test on Unix
if: runner.os != 'Windows'
run: |
export OPENDJ_JAVA_ARGS="-server -Xmx1g"
export OPENDJ_JAVA_ARGS="-server -Xmx512m"
opendj-server-legacy/target/package/opendj/setup -h localhost -p 1389 --ldapsPort 1636 --adminConnectorPort 4444 --enableStartTLS --generateSelfSignedCertificate --rootUserDN "cn=Directory Manager" --rootUserPassword password --baseDN dc=example,dc=com --sampleData 5000 --cli --acceptLicense --no-prompt
opendj-server-legacy/target/package/opendj/bin/status --bindDN "cn=Directory Manager" --bindPassword password
opendj-server-legacy/target/package/opendj/bin/ldapsearch --hostname localhost --port 1636 --bindDN "cn=Directory Manager" --bindPassword password --useSsl --trustAll --baseDN "dc=example,dc=com" --searchScope base "(objectClass=*)" 1.1
Expand All @@ -69,7 +69,7 @@ jobs:
if: runner.os == 'Linux'
run: |
rm -rf opendj-server-legacy/target/package/opendj/config opendj-server-legacy/target/package/opendj/db opendj-server-legacy/target/package/opendj/changelogDb opendj-server-legacy/target/package/opendj/logs
export OPENDJ_JAVA_ARGS="-server -Xmx1g -Ddatastax-java-driver.basic.contact-points.0=localhost:9042 -Ddatastax-java-driver.basic.load-balancing-policy.local-datacenter=datacenter1"
export OPENDJ_JAVA_ARGS="-server -Xmx512m -Ddatastax-java-driver.basic.contact-points.0=localhost:9042 -Ddatastax-java-driver.basic.load-balancing-policy.local-datacenter=datacenter1"
opendj-server-legacy/target/package/opendj/setup --backendType cas -h localhost -p 1389 --ldapsPort 1636 --adminConnectorPort 4444 --enableStartTLS --generateSelfSignedCertificate --rootUserDN "cn=Directory Manager" --rootUserPassword password --baseDN dc=example,dc=com --sampleData 5000 --cli --acceptLicense --no-prompt
opendj-server-legacy/target/package/opendj/bin/status --bindDN "cn=Directory Manager" --bindPassword password
opendj-server-legacy/target/package/opendj/bin/ldapsearch --hostname localhost --port 1636 --bindDN "cn=Directory Manager" --bindPassword password --useSsl --trustAll --baseDN "dc=example,dc=com" --searchScope base "(objectClass=*)" 1.1
Expand All @@ -78,7 +78,7 @@ jobs:
- name: Test on Windows
if: runner.os == 'Windows'
run: |
set OPENDJ_JAVA_ARGS="-server -Xmx1g"
set OPENDJ_JAVA_ARGS="-server -Xmx512m"
opendj-server-legacy\target\package\opendj\setup.bat -h localhost -p 1389 --ldapsPort 1636 --adminConnectorPort 4444 --enableStartTLS --generateSelfSignedCertificate --rootUserDN "cn=Directory Manager" --rootUserPassword password --baseDN dc=example,dc=com --sampleData 5000 --cli --acceptLicense --no-prompt
opendj-server-legacy\target\package\opendj\bat\status.bat --bindDN "cn=Directory Manager" --bindPassword password
opendj-server-legacy\target\package\opendj\bat\ldapsearch.bat --hostname localhost --port 1636 --bindDN "cn=Directory Manager" --bindPassword password --useSsl --trustAll --baseDN "dc=example,dc=com" --searchScope base "(objectClass=*)" 1.1
Expand Down Expand Up @@ -146,7 +146,7 @@ jobs:
- name: Docker test
shell: bash
run: |
docker run --rm -it -d --name=test localhost:5000/${GITHUB_REPOSITORY,,}:${{ env.release_version }}
docker run --rm -it -d --memory="1g" --name=test localhost:5000/${GITHUB_REPOSITORY,,}:${{ env.release_version }}
timeout 3m bash -c 'until docker inspect --format="{{json .State.Health.Status}}" test | grep -q \"healthy\"; do sleep 10; done'
build-docker-alpine:
runs-on: 'ubuntu-latest'
Expand Down Expand Up @@ -195,5 +195,5 @@ jobs:
- name: Docker test
shell: bash
run: |
docker run --rm -it -d --name=test localhost:5000/${GITHUB_REPOSITORY,,}:${{ env.release_version }}-alpine
docker run --rm -it -d --memory="1g" --name=test localhost:5000/${GITHUB_REPOSITORY,,}:${{ env.release_version }}-alpine
timeout 3m bash -c 'until docker inspect --format="{{json .State.Health.Status}}" test | grep -q \"healthy\"; do sleep 10; done'
2 changes: 1 addition & 1 deletion opendj-server-legacy/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1235,7 +1235,7 @@
<org.opends.test.pauseOnFailure>false</org.opends.test.pauseOnFailure>
<org.opends.test.copyClassesToTestPackage>false</org.opends.test.copyClassesToTestPackage>
</systemPropertyVariables>
<argLine> -Xmx1g @{argLine}</argLine>
<argLine>@{argLine}</argLine>
<reuseForks>false</reuseForks>
<forkCount>1</forkCount>
<parallel>none</parallel>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ protected SnmpPeer getSnmpV2Peer(int port)
*/
protected SNMPConnectionHandler getSNMPConnectionHandler() throws Exception
{
List<ConnectionHandler> handlers = DirectoryServer.getConnectionHandlers();
List<ConnectionHandler<?>> handlers = DirectoryServer.getConnectionHandlers();
assertNotNull(handlers);
SNMPConnectionHandler snmpConnectionHandler = null;
for (ConnectionHandler handler : handlers)
Expand Down
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<!-- ForgeRock build tools and Checkstyle versions (to avoid many checkstyle errors with ForgeRock Parent 2.0.10) -->
<checkstylePluginVersion>2.9.1</checkstylePluginVersion>
<checkstyleVersion>5.5</checkstyleVersion>
<argLine />
<argLine>-Xmx512m</argLine>
</properties>

<inceptionYear>2011</inceptionYear>
Expand Down Expand Up @@ -400,7 +400,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.1.2</version>
<version>3.2.5</version>
</plugin>

<plugin>
Expand Down Expand Up @@ -446,7 +446,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.1.2</version> <!-- M6 DecodeException but got java.nio.BufferOverflowException -->
<version>3.2.5</version> <!-- M6 DecodeException but got java.nio.BufferOverflowException -->
<configuration>
<properties>
<property>
Expand Down Expand Up @@ -716,7 +716,7 @@
<jdk>[16,)</jdk>
</activation>
<properties>
<argLine>--add-exports java.base/sun.security.x509=ALL-UNNAMED --add-exports java.base/sun.security.tools.keytool=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.net=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED --add-opens java.base/java.util.regex=ALL-UNNAMED --add-opens java.base/java.security=ALL-UNNAMED --add-opens java.naming/javax.naming.spi=ALL-UNNAMED</argLine>
<argLine>-Xmx512m --add-exports java.base/sun.security.x509=ALL-UNNAMED --add-exports java.base/sun.security.tools.keytool=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.net=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED --add-opens java.base/java.util.regex=ALL-UNNAMED --add-opens java.base/java.security=ALL-UNNAMED --add-opens java.naming/javax.naming.spi=ALL-UNNAMED</argLine>
</properties>
</profile>
<profile>
Expand Down

0 comments on commit 84db4e5

Please sign in to comment.