diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS deleted file mode 100644 index 9e31981..0000000 --- a/.github/CODEOWNERS +++ /dev/null @@ -1 +0,0 @@ -* @splitio/sdk diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index f4768de..0000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,15 +0,0 @@ ---- -version: 2 - -updates: - - package-ecosystem: github-actions - directory: "/" - schedule: - interval: daily - target-branch: development - - package-ecosystem: maven - directory: "/" - schedule: - interval: daily - open-pull-requests-limit: 4 - target-branch: development diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 2eeb3fc..0000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: test - -on: - pull_request: - branches: - - '*' - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number }} - cancel-in-progress: true - -jobs: - test: - name: Run tests - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - jdk: - - '11' - - '17' - - '21' - env: - MAVEN_OPTS: "-Xms2g -Xmx2g -XX:+PrintCommandLineFlags -XX:ThreadStackSize=1024 -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn" - steps: - - name: Checkout code - uses: actions/checkout@v5 - - - name: Setup JDK ${{ matrix.jdk }} - uses: actions/setup-java@v5 - with: - distribution: 'adopt' - java-version: ${{ matrix.jdk }} - cache: 'maven' - - - name: Test - run: mvn --batch-mode -T 2C clean package diff --git a/.harness/orgs/PROD/projects/Harness_Split/pipelines/split_openfeature_provider_java_ci.yaml b/.harness/orgs/PROD/projects/Harness_Split/pipelines/split_openfeature_provider_java_ci.yaml new file mode 100644 index 0000000..1856f91 --- /dev/null +++ b/.harness/orgs/PROD/projects/Harness_Split/pipelines/split_openfeature_provider_java_ci.yaml @@ -0,0 +1,109 @@ +pipeline: + name: split-openfeature-provider-java-ci + identifier: split_openfeature_provider_java_ci + projectIdentifier: Harness_Split + orgIdentifier: PROD + tags: {} + properties: + ci: + codebase: + connectorRef: fmegithubrunnersci + repoName: split-openfeature-provider-java + build: <+input> + depth: 0 + stages: + - stage: + name: test + identifier: test + type: CI + spec: + cloneCodebase: true + caching: + enabled: true + override: true + platform: + os: Linux + arch: Amd64 + runtime: + type: Cloud + spec: {} + execution: + steps: + - parallel: + - step: + type: Run + name: test jdk11 + identifier: test_jdk11 + spec: + connectorRef: dockerhub + image: maven:3.9-eclipse-temurin-11 + shell: Bash + envVariables: + MAVEN_OPTS: "-Xmx2g -XX:+PrintCommandLineFlags -XX:ThreadStackSize=1024 -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn" + command: mvn --batch-mode -T 2C clean test + reports: + type: JUnit + spec: + paths: + - "**/target/surefire-reports/*.xml" + - step: + type: Run + name: test jdk17 + identifier: test_jdk17 + spec: + connectorRef: dockerhub + image: maven:3.9-eclipse-temurin-17 + shell: Bash + envVariables: + MAVEN_OPTS: "-Xmx2g -XX:+PrintCommandLineFlags -XX:ThreadStackSize=1024 -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn" + command: mvn --batch-mode -T 2C clean test + reports: + type: JUnit + spec: + paths: + - "**/target/surefire-reports/*.xml" + - step: + type: Run + name: test jdk21 + identifier: test_jdk21 + spec: + connectorRef: dockerhub + image: maven:3.9-eclipse-temurin-21 + shell: Bash + envVariables: + MAVEN_OPTS: "-Xmx2g -XX:+PrintCommandLineFlags -XX:ThreadStackSize=1024 -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn" + command: mvn --batch-mode -T 2C clean test + reports: + type: JUnit + spec: + paths: + - "**/target/surefire-reports/*.xml" + - step: + type: Run + name: sonar analysis + identifier: sonar_analysis + spec: + connectorRef: dockerhub + image: maven:3.9-eclipse-temurin-17 + shell: Bash + envVariables: + SONAR_HOST_URL: https://sonar.harness.io + SONAR_TOKEN: <+secrets.getValue("sonarqube-token")> + PR_NUMBER: <+trigger.prNumber> + PR_BRANCH: <+trigger.sourceBranch> + PR_BASE_BRANCH: <+trigger.targetBranch> + command: |- + if [ -n "$PR_NUMBER" ] && [ "$PR_NUMBER" != "null" ]; then + mvn --batch-mode org.sonarsource.scanner.maven:sonar-maven-plugin:sonar \ + -Dsonar.host.url="$SONAR_HOST_URL" \ + -Dsonar.token="$SONAR_TOKEN" \ + -Dsonar.pullrequest.key="$PR_NUMBER" \ + -Dsonar.pullrequest.branch="$PR_BRANCH" \ + -Dsonar.pullrequest.base="$PR_BASE_BRANCH" + else + mvn --batch-mode org.sonarsource.scanner.maven:sonar-maven-plugin:sonar \ + -Dsonar.host.url="$SONAR_HOST_URL" \ + -Dsonar.token="$SONAR_TOKEN" + fi + when: + stageStatus: Success diff --git a/.harness/orgs/PROD/projects/Harness_Split/pipelines/split_openfeature_provider_java_ci/input_sets/pr.yaml b/.harness/orgs/PROD/projects/Harness_Split/pipelines/split_openfeature_provider_java_ci/input_sets/pr.yaml new file mode 100644 index 0000000..0483536 --- /dev/null +++ b/.harness/orgs/PROD/projects/Harness_Split/pipelines/split_openfeature_provider_java_ci/input_sets/pr.yaml @@ -0,0 +1,14 @@ +inputSet: + name: pr + identifier: pr + orgIdentifier: PROD + projectIdentifier: Harness_Split + pipeline: + identifier: split_openfeature_provider_java_ci + properties: + ci: + codebase: + build: + type: PR + spec: + number: <+trigger.prNumber> diff --git a/src/test/java/io/split/openfeature/ClientTest.java b/src/test/java/io/split/openfeature/ClientTest.java index 667d33b..df06572 100644 --- a/src/test/java/io/split/openfeature/ClientTest.java +++ b/src/test/java/io/split/openfeature/ClientTest.java @@ -275,7 +275,7 @@ public void getObjectFailTest() { @Test public void destroySplitClientTest() { assertEquals("32", splitClient.getTreatment("key","int_feature")); - openFeatureAPI.shutdown(); + splitClient.destroy(); assertEquals("control", splitClient.getTreatment("key","int_feature")); }