mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

vharseko
06.48.2024 84db4e5cc0297005a3ddfd3f7ed05639e082d256
ADD build test with memory pressure (#323)

4 files modified
22 ■■■■ changed files
.github/workflows/build.yml 10 ●●●● patch | view | raw | blame | history
opendj-server-legacy/pom.xml 2 ●●● patch | view | raw | blame | history
opendj-server-legacy/src/test/java/org/opends/server/snmp/SNMPConnectionManager.java 2 ●●● patch | view | raw | blame | history
pom.xml 8 ●●●● patch | view | raw | blame | history
.github/workflows/build.yml
@@ -59,7 +59,7 @@
    - 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
@@ -69,7 +69,7 @@
      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
@@ -78,7 +78,7 @@
    - 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
@@ -146,7 +146,7 @@
      - 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'
@@ -195,5 +195,5 @@
      - 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'
opendj-server-legacy/pom.xml
@@ -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>
opendj-server-legacy/src/test/java/org/opends/server/snmp/SNMPConnectionManager.java
@@ -188,7 +188,7 @@
   */
  protected SNMPConnectionHandler getSNMPConnectionHandler() throws Exception
  {
    List<ConnectionHandler> handlers = DirectoryServer.getConnectionHandlers();
    List<ConnectionHandler<?>> handlers = DirectoryServer.getConnectionHandlers();
    assertNotNull(handlers);
    SNMPConnectionHandler snmpConnectionHandler = null;
    for (ConnectionHandler handler : handlers)
pom.xml
@@ -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>
@@ -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>
@@ -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>
@@ -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>