Repository: deepjavalibrary/djl
Pull request #2120 (2022-11-02 20:41:07)

Refactor unit test TestRequirements, add missing TestRequirements
## Description ##

Two sets of changes in this PR:
- Remove duplicate usage of TestRequirements.someRequirement() in unit tests and move them to a setUp method.
- Adds missing TestRequirements on some timeseries unit tests to not run on Arm


codecov-commenter: # [Codecov](https://codecov.io/gh/deepjavalibrary/djl/pull/2120?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=deepjavalibrary) Report
Base: **72.08**% // Head: **71.33**% // Decreases project coverage by **`-0.75%`** :warning:
> Coverage data is based on head [(`bc630f0`)](https://codecov.io/gh/deepjavalibrary/djl/pull/2120?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=deepjavalibrary) compared to base [(`bb5073f`)](https://codecov.io/gh/deepjavalibrary/djl/commit/bb5073f7ffc33f1883621fc1783dbb01e70b418f?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=deepjavalibrary).
> Patch coverage: 71.54% of modified lines in pull request are covered.

<details><summary>Additional details and impacted files</summary>


```diff
@@             Coverage Diff              @@
##             master    #2120      +/-   ##
============================================
- Coverage     72.08%   71.33%   -0.76%     
- Complexity     5126     6282    +1156     
============================================
  Files           473      624     +151     
  Lines         21970    27823    +5853     
  Branches       2351     3000     +649     
============================================
+ Hits          15838    19848    +4010     
- Misses         4925     6515    +1590     
- Partials       1207     1460     +253     
```


| [Impacted Files](https://codecov.io/gh/deepjavalibrary/djl/pull/2120?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=deepjavalibrary) | Coverage Δ | |
|---|---|---|
| [api/src/main/java/ai/djl/modality/cv/Image.java](https://codecov.io/gh/deepjavalibrary/djl/pull/2120/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=deepjavalibrary#diff-YXBpL3NyYy9tYWluL2phdmEvYWkvZGpsL21vZGFsaXR5L2N2L0ltYWdlLmphdmE=) | `69.23% <ø> (-4.11%)` | :arrow_down: |
| [...rc/main/java/ai/djl/modality/cv/MultiBoxPrior.java](https://codecov.io/gh/deepjavalibrary/djl/pull/2120/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=deepjavalibrary#diff-YXBpL3NyYy9tYWluL2phdmEvYWkvZGpsL21vZGFsaXR5L2N2L011bHRpQm94UHJpb3IuamF2YQ==) | `76.00% <ø> (ø)` | |
| [...rc/main/java/ai/djl/modality/cv/output/Joints.java](https://codecov.io/gh/deepjavalibrary/djl/pull/2120/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=deepjavalibrary#diff-YXBpL3NyYy9tYWluL2phdmEvYWkvZGpsL21vZGFsaXR5L2N2L291dHB1dC9Kb2ludHMuamF2YQ==) | `71.42% <ø> (ø)` | |
| [.../main/java/ai/djl/modality/cv/output/Landmark.java](https://codecov.io/gh/deepjavalibrary/djl/pull/2120/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=deepjavalibrary#diff-YXBpL3NyYy9tYWluL2phdmEvYWkvZGpsL21vZGFsaXR5L2N2L291dHB1dC9MYW5kbWFyay5qYXZh) | `100.00% <ø> (ø)` | |
| [...main/java/ai/djl/modality/cv/output/Rectangle.java](https://codecov.io/gh/deepjavalibrary/djl/pull/2120/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=deepjavalibrary#diff-YXBpL3NyYy9tYWluL2phdmEvYWkvZGpsL21vZGFsaXR5L2N2L291dHB1dC9SZWN0YW5nbGUuamF2YQ==) | `72.41% <0.00%> (ø)` | |
| [...i/djl/modality/cv/translator/BigGANTranslator.java](https://codecov.io/gh/deepjavalibrary/djl/pull/2120/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=deepjavalibrary#diff-YXBpL3NyYy9tYWluL2phdmEvYWkvZGpsL21vZGFsaXR5L2N2L3RyYW5zbGF0b3IvQmlnR0FOVHJhbnNsYXRvci5qYXZh) | `21.42% <0.00%> (-5.24%)` | :arrow_down: |
| [.../modality/cv/translator/ImageFeatureExtractor.java](https://codecov.io/gh/deepjavalibrary/djl/pull/2120/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=deepjavalibrary#diff-YXBpL3NyYy9tYWluL2phdmEvYWkvZGpsL21vZGFsaXR5L2N2L3RyYW5zbGF0b3IvSW1hZ2VGZWF0dXJlRXh0cmFjdG9yLmphdmE=) | `0.00% <0.00%> (ø)` | |
| [.../ai/djl/modality/cv/translator/YoloTranslator.java](https://codecov.io/gh/deepjavalibrary/djl/pull/2120/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=deepjavalibrary#diff-YXBpL3NyYy9tYWluL2phdmEvYWkvZGpsL21vZGFsaXR5L2N2L3RyYW5zbGF0b3IvWW9sb1RyYW5zbGF0b3IuamF2YQ==) | `27.77% <0.00%> (+18.95%)` | :arrow_up: |
| [...modality/cv/translator/wrapper/FileTranslator.java](https://codecov.io/gh/deepjavalibrary/djl/pull/2120/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=deepjavalibrary#diff-YXBpL3NyYy9tYWluL2phdmEvYWkvZGpsL21vZGFsaXR5L2N2L3RyYW5zbGF0b3Ivd3JhcHBlci9GaWxlVHJhbnNsYXRvci5qYXZh) | `44.44% <ø> (ø)` | |
| [...y/cv/translator/wrapper/InputStreamTranslator.java](https://codecov.io/gh/deepjavalibrary/djl/pull/2120/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=deepjavalibrary#diff-YXBpL3NyYy9tYWluL2phdmEvYWkvZGpsL21vZGFsaXR5L2N2L3RyYW5zbGF0b3Ivd3JhcHBlci9JbnB1dFN0cmVhbVRyYW5zbGF0b3IuamF2YQ==) | `44.44% <ø> (ø)` | |
| ... and [558 more](https://codecov.io/gh/deepjavalibrary/djl/pull/2120/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=deepjavalibrary) | |

Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=deepjavalibrary). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=deepjavalibrary)

</details>

[:umbrella: View full report at Codecov](https://codecov.io/gh/deepjavalibrary/djl/pull/2120?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=deepjavalibrary).   
:loudspeaker: Do you have feedback about the report comment? [Let us know in this issue](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=deepjavalibrary).


Patch:
diff --git a/.github/workflows/codeql-analysis-java.yml b/.github/workflows/codeql-analysis-java.yml
index 0437530a9..107efb922 100644
--- a/.github/workflows/codeql-analysis-java.yml
+++ b/.github/workflows/codeql-analysis-java.yml
@@ -34,7 +34,7 @@ jobs:
 
     steps:
       - name: Checkout repository
-        uses: actions/checkout@v2
+        uses: actions/checkout@v3
 
       - name: Set up JDK 11
         uses: actions/setup-java@v3
diff --git a/.github/workflows/continuous.yml b/.github/workflows/continuous.yml
index 5aca115af..1ccd4dfd7 100644
--- a/.github/workflows/continuous.yml
+++ b/.github/workflows/continuous.yml
@@ -20,13 +20,14 @@ jobs:
         operating-system: [ ubuntu-18.04, macos-latest ]
 
     steps:
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v3
       - name: Set up JDK 11
-        uses: actions/setup-java@v1
+        uses: actions/setup-java@v3
         with:
+          distribution: 'corretto'
           java-version: 11
       # Enable gradle cache: https://github.com/actions/cache/blob/master/examples.md#java---gradle
-      - uses: actions/cache@v2
+      - uses: actions/cache@v3
         with:
           path: ~/.gradle/caches
           key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
@@ -68,13 +69,14 @@ jobs:
     if: github.repository == 'deepjavalibrary/djl'
     runs-on: windows-latest
     steps:
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v3
       - name: Set up JDK 11
-        uses: actions/setup-java@v1
+        uses: actions/setup-java@v3
         with:
+          distribution: 'corretto'
           java-version: 11
       # Enable gradle cache: https://github.com/actions/cache/blob/master/examples.md#java---gradle
-      - uses: actions/cache@v2
+      - uses: actions/cache@v3
         with:
           path: ~/.gradle/caches
           key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
index 979496c54..25cfba51f 100644
--- a/.github/workflows/docs.yml
+++ b/.github/workflows/docs.yml
@@ -16,8 +16,9 @@ jobs:
     runs-on: ubuntu-18.04
     steps:
       - name: Set up JDK 11
-        uses: actions/setup-java@v1
+        uses: actions/setup-java@v3
         with:
+          distribution: 'corretto'
           java-version: 11
       - name: Set up Python3
         uses: actions/setup-python@v1
@@ -33,7 +34,7 @@ jobs:
           cd IJava/
           ./gradlew installKernel
       - name: checkout repo
-        uses: actions/checkout@v2
+        uses: actions/checkout@v3
       - name: add mybinder link
         run: |
           python3 tools/scripts/add_online_runner.py
diff --git a/.github/workflows/native_build_mxnet_osx.yml b/.github/workflows/native_build_mxnet_osx.yml
index 9819ed38b..d587c09a6 100644
--- a/.github/workflows/native_build_mxnet_osx.yml
+++ b/.github/workflows/native_build_mxnet_osx.yml
@@ -9,7 +9,7 @@ jobs:
 
     steps:
       - name: Checkout Apache MXNet repository
-        uses: actions/checkout@v2
+        uses: actions/checkout@v3
         with:
           repository: apache/incubator-mxnet
           ref: 1.9.1
diff --git a/.github/workflows/native_jni_s3_dlr.yml b/.github/workflows/native_jni_s3_dlr.yml
index 7c9dd7c98..2334bdb96 100644
--- a/.github/workflows/native_jni_s3_dlr.yml
+++ b/.github/workflows/native_jni_s3_dlr.yml
@@ -7,12 +7,13 @@ jobs:
   build-dlr-jni-cpu:
     runs-on: macos-latest
     steps:
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v3
       - name: Set up JDK 11
-        uses: actions/setup-java@v1
+        uses: actions/setup-java@v3
         with:
+          distribution: 'corretto'
           java-version: 11
-      - uses: actions/cache@v2
+      - uses: actions/cache@v3
         with:
           path: ~/.gradle/caches
           key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
@@ -46,12 +47,13 @@ jobs:
           yum -y install patch cmake3
           ln -sf /usr/bin/cmake3 /usr/bin/cmake
           pip3 install awscli --upgrade
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v3
       - name: Set up JDK 11
-        uses: actions/setup-java@v1
+        uses: actions/setup-java@v3
         with:
+          distribution: 'corretto'
           java-version: 11
-      - uses: actions/cache@v2
+      - uses: actions/cache@v3
         with:
           path: ~/.gradle/caches
           key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
diff --git a/.github/workflows/native_jni_s3_paddle.yml b/.github/workflows/native_jni_s3_paddle.yml
index daccdfe2e..45e6d0fc4 100644
--- a/.github/workflows/native_jni_s3_paddle.yml
+++ b/.github/workflows/native_jni_s3_paddle.yml
@@ -14,12 +14,13 @@ jobs:
         operating-system: [ macos-latest, windows-latest ]
 
     steps:
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v3
       - name: Set up JDK 11
-        uses: actions/setup-java@v1
+        uses: actions/setup-java@v3
         with:
+          distribution: 'corretto'
           java-version: 11
-      - uses: actions/cache@v2
+      - uses: actions/cache@v3
         with:
           path: ~/.gradle/caches
           key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
@@ -53,12 +54,13 @@ jobs:
           yum -y install patch cmake3
           ln -sf /usr/bin/cmake3 /usr/bin/cmake
           pip3 install awscli --upgrade
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v3
       - name: Set up JDK 11
-        uses: actions/setup-java@v1
+        uses: actions/setup-java@v3
         with:
+          distribution: 'corretto'
           java-version: 11
-      - uses: actions/cache@v2
+      - uses: actions/cache@v3
         with:
           path: ~/.gradle/caches
           key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
@@ -79,7 +81,7 @@ jobs:
     runs-on: ubuntu-latest
     needs: [ build-paddle-jni-cpu, build-paddle-jni-linux ]
     steps:
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v3
       - name: Download compiledJNI Mac
         uses: actions/download-artifact@v1
         with:
diff --git a/.github/workflows/native_jni_s3_pytorch.yml b/.github/workflows/native_jni_s3_pytorch.yml
index ef942fe17..be567afba 100644
--- a/.github/workflows/native_jni_s3_pytorch.yml
+++ b/.github/workflows/native_jni_s3_pytorch.yml
@@ -15,12 +15,13 @@ jobs:
     runs-on: macos-latest
 
     steps:
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v3
       - name: Set up JDK 11
-        uses: actions/setup-java@v1
+        uses: actions/setup-java@v3
         with:
+          distribution: 'corretto'
           java-version: 11
-      - uses: actions/cache@v2
+      - uses: actions/cache@v3
         with:
           path: ~/.gradle/caches
           key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
@@ -53,12 +54,13 @@ jobs:
     runs-on: ubuntu-latest
     container: nvidia/cuda:11.3.1-cudnn8-devel-ubuntu18.04
     steps:
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v3
       - name: Set up JDK 11
-        uses: actions/setup-java@v1
+        uses: actions/setup-java@v3
         with:
+          distribution: 'corretto'
           java-version: 11
-      - uses: actions/cache@v2
+      - uses: actions/cache@v3
         with:
           path: ~/.gradle/caches
           key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
@@ -111,12 +113,13 @@ jobs:
           yum -y install devtoolset-7 rh-git218 patch cmake3
           ln -s /usr/bin/cmake3 /usr/bin/cmake
           pip3 install awscli --upgrade
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v3
       - name: Set up JDK 11
-        uses: actions/setup-java@v1
+        uses: actions/setup-java@v3
         with:
+          distribution: 'corretto'
           java-version: 11
-      - uses: actions/cache@v2
+      - uses: actions/cache@v3
         with:
           path: ~/.gradle/caches
           key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
@@ -150,12 +153,13 @@ jobs:
     if: github.repository == 'deepjavalibrary/djl'
     runs-on: windows-latest
     steps:
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v3
       - name: Set up JDK 11
-        uses: actions/setup-java@v1
+        uses: actions/setup-java@v3
         with:
+          distribution: 'corretto'
           java-version: 11
-      - uses: actions/cache@v2
+      - uses: actions/cache@v3
         with:
           path: ~/.gradle/caches
           key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
@@ -208,7 +212,7 @@ jobs:
           java-version: 11
           distribution: corretto
           architecture: aarch64
-      - uses: actions/cache@v2
+      - uses: actions/cache@v3
         with:
           path: ~/.gradle/caches
           key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
@@ -265,7 +269,7 @@ jobs:
           yum -y install patch git cmake3 python3-devel java-11-amazon-corretto
           ln -sf /usr/bin/cmake3 /usr/bin/cmake
           pip3 install awscli --upgrade
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v3
       - name: Release JNI prep
         run: |
           export JAVA_HOME=/usr/lib/jvm/java-11-amazon-corretto.aarch64
diff --git a/.github/workflows/native_jni_s3_pytorch_android.yml b/.github/workflows/native_jni_s3_pytorch_android.yml
index bee17c163..93da7f4db 100644
--- a/.github/workflows/native_jni_s3_pytorch_android.yml
+++ b/.github/workflows/native_jni_s3_pytorch_android.yml
@@ -12,12 +12,13 @@ jobs:
       NDK_VERSION: "21.1.6352462"
 
     steps:
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v3
       - name: Set up JDK 11
-        uses: actions/setup-java@v1
+        uses: actions/setup-java@v3
         with:
+          distribution: 'corretto'
           java-version: 11
-      - uses: actions/cache@v2
+      - uses: actions/cache@v3
         with:
           path: ~/.gradle/caches
           key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
diff --git a/.github/workflows/native_jni_s3_tensorrt.yml b/.github/workflows/native_jni_s3_tensorrt.yml
index ff34ed63b..874c8c16d 100644
--- a/.github/workflows/native_jni_s3_tensorrt.yml
+++ b/.github/workflows/native_jni_s3_tensorrt.yml
@@ -10,12 +10,13 @@ jobs:
     steps:
       - name: Install Environment
         run: pip3 install awscli --upgrade
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v3
       - name: Set up JDK 11
-        uses: actions/setup-java@v1
+        uses: actions/setup-java@v3
         with:
+          distribution: 'corretto'
           java-version: 11
-      - uses: actions/cache@v2
+      - uses: actions/cache@v3
         with:
           path: ~/.gradle/caches
           key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
diff --git a/.github/workflows/native_publish_dlr.yml b/.github/workflows/native_publish_dlr.yml
index be7ac03ad..04e1ed779 100644
--- a/.github/workflows/native_publish_dlr.yml
+++ b/.github/workflows/native_publish_dlr.yml
@@ -13,13 +13,14 @@ jobs:
     runs-on: ubuntu-18.04
 
     steps:
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v3
       - name: Set up JDK 11
-        uses: actions/setup-java@v1
+        uses: actions/setup-java@v3
         with:
+          distribution: 'corretto'
           java-version: 11
       # Enable gradle cache: https://github.com/actions/cache/blob/master/examples.md#java---gradle
-      - uses: actions/cache@v2
+      - uses: actions/cache@v3
         with:
           path: ~/.gradle/caches
           key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
diff --git a/.github/workflows/native_publish_mxnet.yml b/.github/workflows/native_publish_mxnet.yml
index af2b91a0a..3b86e40c9 100644
--- a/.github/workflows/native_publish_mxnet.yml
+++ b/.github/workflows/native_publish_mxnet.yml
@@ -13,13 +13,14 @@ jobs:
     runs-on: ubuntu-18.04
 
     steps:
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v3
       - name: Set up JDK 11
-        uses: actions/setup-java@v1
+        uses: actions/setup-java@v3
         with:
+          distribution: 'corretto'
           java-version: 11
       # Enable gradle cache: https://github.com/actions/cache/blob/master/examples.md#java---gradle
-      - uses: actions/cache@v2
+      - uses: actions/cache@v3
         with:
           path: ~/.gradle/caches
           key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
diff --git a/.github/workflows/native_publish_paddle.yml b/.github/workflows/native_publish_paddle.yml
index b42fe94c8..601ef51d4 100644
--- a/.github/workflows/native_publish_paddle.yml
+++ b/.github/workflows/native_publish_paddle.yml
@@ -13,13 +13,14 @@ jobs:
     runs-on: ubuntu-18.04
 
     steps:
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v3
       - name: Set up JDK 11
-        uses: actions/setup-java@v1
+        uses: actions/setup-java@v3
         with:
+          distribution: 'corretto'
           java-version: 11
       # Enable gradle cache: https://github.com/actions/cache/blob/master/examples.md#java---gradle
-      - uses: actions/cache@v2
+      - uses: actions/cache@v3
         with:
           path: ~/.gradle/caches
           key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
diff --git a/.github/workflows/native_publish_pytorch.yml b/.github/workflows/native_publish_pytorch.yml
index 2ba5e67d6..f3ef6496a 100644
--- a/.github/workflows/native_publish_pytorch.yml
+++ b/.github/workflows/native_publish_pytorch.yml
@@ -13,13 +13,14 @@ jobs:
     runs-on: macos-latest
 
     steps:
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v3
       - name: Set up JDK 11
-        uses: actions/setup-java@v1
+        uses: actions/setup-java@v3
         with:
+          distribution: 'corretto'
           java-version: 11
       # Enable gradle cache: https://github.com/actions/cache/blob/master/examples.md#java---gradle
-      - uses: actions/cache@v2
+      - uses: actions/cache@v3
         with:
           path: ~/.gradle/caches
           key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
diff --git a/.github/workflows/native_publish_tensorflow.yml b/.github/workflows/native_publish_tensorflow.yml
index 77b9b66d8..54255bc48 100644
--- a/.github/workflows/native_publish_tensorflow.yml
+++ b/.github/workflows/native_publish_tensorflow.yml
@@ -13,13 +13,14 @@ jobs:
     runs-on: ubuntu-18.04
 
     steps:
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v3
       - name: Set up JDK 11
-        uses: actions/setup-java@v1
+        uses: actions/setup-java@v3
         with:
+          distribution: 'corretto'
           java-version: 11
       # Enable gradle cache: https://github.com/actions/cache/blob/master/examples.md#java---gradle
-      - uses: actions/cache@v2
+      - uses: actions/cache@v3
         with:
           path: ~/.gradle/caches
           key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
diff --git a/.github/workflows/native_publish_tflite.yml b/.github/workflows/native_publish_tflite.yml
index ee7c48be0..75c02cd03 100644
--- a/.github/workflows/native_publish_tflite.yml
+++ b/.github/workflows/native_publish_tflite.yml
@@ -13,13 +13,14 @@ jobs:
     runs-on: ubuntu-18.04
 
     steps:
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v3
       - name: Set up JDK 11
-        uses: actions/setup-java@v1
+        uses: actions/setup-java@v3
         with:
+          distribution: 'corretto'
           java-version: 11
       # Enable gradle cache: https://github.com/actions/cache/blob/master/examples.md#java---gradle
-      - uses: actions/cache@v2
+      - uses: actions/cache@v3
         with:
           path: ~/.gradle/caches
           key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
diff --git a/.github/workflows/native_s3_dlr.yml b/.github/workflows/native_s3_dlr.yml
index 5f3cf8389..5395ae008 100644
--- a/.github/workflows/native_s3_dlr.yml
+++ b/.github/workflows/native_s3_dlr.yml
@@ -7,17 +7,18 @@ jobs:
   build-osx:
     runs-on: macos-latest
     steps:
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v3
       - name: Set up JDK 11
-        uses: actions/setup-java@v1
+        uses: actions/setup-java@v3
         with:
+          distribution: 'corretto'
           java-version: 11
       - name: Get DLR_VERSION
         run: |
           DLR_VERSION="$(cat gradle.properties | awk -F '=' '/dlr_version/ {print $2}')"
           echo "DLR_VERSION=${DLR_VERSION}" >> $GITHUB_ENV
       - name: Checkout DLR repo
-        uses: actions/checkout@v2
+        uses: actions/checkout@v3
         with:
           repository: neo-ai/neo-ai-dlr
           ref: v${{ env.DLR_VERSION }}
@@ -52,17 +53,18 @@ jobs:
           yum -y install patch cmake3
           ln -sf /usr/bin/cmake3 /usr/bin/cmake
           pip3 install awscli --upgrade
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v3
       - name: Set up JDK 11
-        uses: actions/setup-java@v1
+        uses: actions/setup-java@v3
         with:
+          distribution: 'corretto'
           java-version: 11
       - name: Get DLR_VERSION
         run: |
           DLR_VERSION="$(cat gradle.properties | awk -F '=' '/dlr_version/ {print $2}')"
           echo "DLR_VERSION=${DLR_VERSION}" >> $GITHUB_ENV
       - name: Checkout DLR repo
-        uses: actions/checkout@v2
+        uses: actions/checkout@v3
         with:
           repository: neo-ai/neo-ai-dlr
           ref: v${{ env.DLR_VERSION }}
diff --git a/.github/workflows/native_s3_fasttext.yml b/.github/workflows/native_s3_fasttext.yml
index 46eea773c..c6a4acec3 100644
--- a/.github/workflows/native_s3_fasttext.yml
+++ b/.github/workflows/native_s3_fasttext.yml
@@ -7,12 +7,13 @@ jobs:
   build-fasttext-jni-osx:
     runs-on: macos-latest
     steps:
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v3
       - name: Set up JDK 11
-        uses: actions/setup-java@v1
+        uses: actions/setup-java@v3
         with:
+          distribution: 'corretto'
           java-version: 11
-      - uses: actions/cache@v2
+      - uses: actions/cache@v3
         with:
           path: ~/.gradle/caches
           key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
@@ -44,12 +45,13 @@ jobs:
           yum -y install patch cmake3
           ln -sf /usr/bin/cmake3 /usr/bin/cmake
           pip3 install awscli --upgrade
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v3
       - name: Set up JDK 11
-        uses: actions/setup-java@v1
+        uses: actions/setup-java@v3
         with:
+          distribution: 'corretto'
           java-version: 11
-      - uses: actions/cache@v2
+      - uses: actions/cache@v3
         with:
           path: ~/.gradle/caches
           key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
diff --git a/.github/workflows/native_s3_huggingface.yml b/.github/workflows/native_s3_huggingface.yml
index ce7f08a10..924482a50 100644
--- a/.github/workflows/native_s3_huggingface.yml
+++ b/.github/workflows/native_s3_huggingface.yml
@@ -7,15 +7,16 @@ jobs:
   build-tokenizers-jni-osx:
     runs-on: macos-latest
     steps:
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v3
       - name: Set up JDK 11
-        uses: actions/setup-java@v1
+        uses: actions/setup-java@v3
         with:
+          distribution: 'corretto'
           java-version: 11
       - uses: actions-rs/toolchain@v1
         with:
           toolchain: stable
-      - uses: actions/cache@v2
+      - uses: actions/cache@v3
         with:
           path: ~/.gradle/caches
           key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
@@ -52,12 +53,13 @@ jobs:
       - uses: actions-rs/toolchain@v1
         with:
           toolchain: stable
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v3
       - name: Set up JDK 11
-        uses: actions/setup-java@v1
+        uses: actions/setup-java@v3
         with:
+          distribution: 'corretto'
           java-version: 11
-      - uses: actions/cache@v2
+      - uses: actions/cache@v3
         with:
           path: ~/.gradle/caches
           key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
@@ -90,12 +92,13 @@ jobs:
       - uses: actions-rs/toolchain@v1
         with:
           toolchain: stable
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v3
       - name: Set up JDK 11
-        uses: actions/setup-java@v1
+        uses: actions/setup-java@v3
         with:
+          distribution: 'corretto'
           java-version: 11
-      - uses: actions/cache@v2
+      - uses: actions/cache@v3
         with:
           path: ~/.gradle/caches
           key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
@@ -133,7 +136,7 @@ jobs:
       - uses: actions-rs/toolchain@v1
         with:
           toolchain: stable
-      - uses: actions/cache@v2
+      - uses: actions/cache@v3
         with:
           path: ~/.gradle/caches
           key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
@@ -189,14 +192,14 @@ jobs:
       - uses: actions-rs/toolchain@v1
         with:
           toolchain: stable
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v3
       - name: Set up JDK 11
         uses: actions/setup-java@v3
         with:
           java-version: 11
           distribution: corretto
           architecture: aarch64
-      - uses: actions/cache@v2
+      - uses: actions/cache@v3
         with:
           path: ~/.gradle/caches
           key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
diff --git a/.github/workflows/native_s3_pytorch.yml b/.github/workflows/native_s3_pytorch.yml
index 038d63117..d0ac68815 100644
--- a/.github/workflows/native_s3_pytorch.yml
+++ b/.github/workflows/native_s3_pytorch.yml
@@ -7,13 +7,14 @@ jobs:
   build:
     runs-on: macos-latest
     steps:
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v3
       - name: Set up JDK 11
-        uses: actions/setup-java@v1
+        uses: actions/setup-java@v3
         with:
+          distribution: 'corretto'
           java-version: 11
       # Enable gradle cache: https://github.com/actions/cache/blob/master/examples.md#java---gradle
-      - uses: actions/cache@v2
+      - uses: actions/cache@v3
         with:
           path: ~/.gradle/caches
           key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
diff --git a/.github/workflows/native_s3_pytorch_android.yml b/.github/workflows/native_s3_pytorch_android.yml
index e895cf149..9eed27aff 100644
--- a/.github/workflows/native_s3_pytorch_android.yml
+++ b/.github/workflows/native_s3_pytorch_android.yml
@@ -13,10 +13,11 @@ jobs:
       PYTORCH_VERSION: "1.12.1"
       NDK_VERSION: "21.1.6352462"
     steps:
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v3
       - name: Set up JDK 11
-        uses: actions/setup-java@v1
+        uses: actions/setup-java@v3
         with:
+          distribution: 'corretto'
           java-version: 11
       - name: Set up Python3
         uses: actions/setup-python@v3
diff --git a/.github/workflows/native_s3_sentencepiece.yml b/.github/workflows/native_s3_sentencepiece.yml
index 300dc08d7..cb03a7783 100644
--- a/.github/workflows/native_s3_sentencepiece.yml
+++ b/.github/workflows/native_s3_sentencepiece.yml
@@ -7,12 +7,13 @@ jobs:
   build-sentencepiece-jni-osx:
     runs-on: macos-latest
     steps:
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v3
       - name: Set up JDK 11
-        uses: actions/setup-java@v1
+        uses: actions/setup-java@v3
         with:
+          distribution: 'corretto'
           java-version: 11
-      - uses: actions/cache@v2
+      - uses: actions/cache@v3
         with:
           path: ~/.gradle/caches
           key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
@@ -45,12 +46,13 @@ jobs:
           yum -y install patch cmake3
           ln -sf /usr/bin/cmake3 /usr/bin/cmake
           pip3 install awscli --upgrade
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v3
       - name: Set up JDK 11
-        uses: actions/setup-java@v1
+        uses: actions/setup-java@v3
         with:
+          distribution: 'corretto'
           java-version: 11
-      - uses: actions/cache@v2
+      - uses: actions/cache@v3
         with:
           path: ~/.gradle/caches
           key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
@@ -75,12 +77,13 @@ jobs:
   build-sentencepiece-jni-windows:
     runs-on: windows-latest
     steps:
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v3
       - name: Set up JDK 11
-        uses: actions/setup-java@v1
+        uses: actions/setup-java@v3
         with:
+          distribution: 'corretto'
           java-version: 11
-      - uses: actions/cache@v2
+      - uses: actions/cache@v3
         with:
           path: ~/.gradle/caches
           key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
diff --git a/.github/workflows/native_s3_tensorflow.yml b/.github/workflows/native_s3_tensorflow.yml
index 675794d33..6e7909b1b 100644
--- a/.github/workflows/native_s3_tensorflow.yml
+++ b/.github/workflows/native_s3_tensorflow.yml
@@ -7,13 +7,14 @@ jobs:
   upload:
     runs-on: ubuntu-18.04
     steps:
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v3
       - name: Set up JDK 11
-        uses: actions/setup-java@v1
+        uses: actions/setup-java@v3
         with:
+          distribution: 'corretto'
           java-version: 11
       # Enable gradle cache: https://github.com/actions/cache/blob/master/examples.md#java---gradle
-      - uses: actions/cache@v2
+      - uses: actions/cache@v3
         with:
           path: ~/.gradle/caches
           key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
diff --git a/.github/workflows/native_s3_tflite.yml b/.github/workflows/native_s3_tflite.yml
index d31ff2b7d..847606e99 100644
--- a/.github/workflows/native_s3_tflite.yml
+++ b/.github/workflows/native_s3_tflite.yml
@@ -7,19 +7,20 @@ jobs:
   build-osx:
     runs-on: macos-latest
     steps:
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v3
       - name: Get TFLITE_VERSION
         run: |
           TFLITE_VERSION="$(cat gradle.properties | awk -F '=' '/tflite_version/ {print $2}')"
           echo "TFLITE_VERSION=${TFLITE_VERSION}" >> $GITHUB_ENV
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v3
         with:
           repository: tensorflow/tensorflow
           ref: v${{ env.TFLITE_VERSION }}
           submodules: 'recursive'
       - name: Set up JDK 11
-        uses: actions/setup-java@v1
+        uses: actions/setup-java@v3
         with:
+          distribution: 'corretto'
           java-version: 11
       - name: Set up Python3
         uses: actions/setup-python@v2
@@ -56,12 +57,12 @@ jobs:
           ln -sf /usr/bin/cmake3 /usr/bin/cmake
           pip3 install awscli --upgrade
           pip3 install numpy --upgrade
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v3
       - name: Get TFLITE_VERSION
         run: |
           TFLITE_VERSION="$(cat gradle.properties | awk -F '=' '/tflite_version/ {print $2}')"
           echo "TFLITE_VERSION=${TFLITE_VERSION}" >> $GITHUB_ENV
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v3
         with:
           repository: tensorflow/tensorflow
           ref: v${{ env.TFLITE_VERSION }}
diff --git a/.github/workflows/nightly_android.yml b/.github/workflows/nightly_android.yml
index 21e29247b..541d2ba92 100644
--- a/.github/workflows/nightly_android.yml
+++ b/.github/workflows/nightly_android.yml
@@ -16,8 +16,9 @@ jobs:
     steps:
       - uses: actions/checkout@v3
       - name: Set up JDK 11
-        uses: actions/setup-java@v1
+        uses: actions/setup-java@v3
         with:
+          distribution: 'corretto'
           java-version: 11
       - name: Gradle cache
         uses: gradle/gradle-build-action@v2
diff --git a/.github/workflows/nightly_publish.yml b/.github/workflows/nightly_publish.yml
index e60b98e72..4f932a4d0 100644
--- a/.github/workflows/nightly_publish.yml
+++ b/.github/workflows/nightly_publish.yml
@@ -19,13 +19,14 @@ jobs:
         operating-system: [ macos-latest, ubuntu-18.04 ]
 
     steps:
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v3
       - name: Set up JDK 11
-        uses: actions/setup-java@v1
+        uses: actions/setup-java@v3
         with:
+          distribution: 'corretto'
           java-version: 11
       # Enable gradle cache: https://github.com/actions/cache/blob/master/examples.md#java---gradle
-      - uses: actions/cache@v2
+      - uses: actions/cache@v3
         with:
           path: ~/.gradle/caches
           key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
@@ -50,13 +51,14 @@ jobs:
         operating-system: [ macos-latest, ubuntu-18.04, windows-latest ]
 
     steps:
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v3
       - name: Set up JDK 11
-        uses: actions/setup-java@v1
+        uses: actions/setup-java@v3
         with:
+          distribution: 'corretto'
           java-version: 11
       # Enable gradle cache: https://github.com/actions/cache/blob/master/examples.md#java---gradle
-      - uses: actions/cache@v2
+      - uses: actions/cache@v3
         with:
           path: ~/.gradle/caches
           key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
@@ -75,8 +77,9 @@ jobs:
     steps:
       - uses: actions/checkout@v1
       - name: Set up JDK 11
-        uses: actions/setup-java@v1
+        uses: actions/setup-java@v3
         with:
+          distribution: 'corretto'
           java-version: 11
       # Enable gradle cache: https://github.com/actions/cache/blob/master/examples.md#java---gradle
       - uses: actions/cache@v1
@@ -202,13 +205,14 @@ jobs:
     runs-on: ubuntu-18.04
     needs: [ build, test-pytorch, test-tensorflow, test-aarch64, test-cuda-102, test-cuda-113 ]
     steps:
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v3
       - name: Set up JDK 11
-        uses: actions/setup-java@v1
+        uses: actions/setup-java@v3
         with:
+          distribution: 'corretto'
           java-version: 11
       # Enable gradle cache: https://github.com/actions/cache/blob/master/examples.md#java---gradle
-      - uses: actions/cache@v2
+      - uses: actions/cache@v3
         with:
           path: ~/.gradle/caches
           key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
diff --git a/.github/workflows/publish_android_packages.yml b/.github/workflows/publish_android_packages.yml
index bbed73b10..23319faa6 100644
--- a/.github/workflows/publish_android_packages.yml
+++ b/.github/workflows/publish_android_packages.yml
@@ -14,13 +14,14 @@ jobs:
   release-android:
     runs-on: ubuntu-18.04
     steps:
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v3
       - name: Set up JDK 11
-        uses: actions/setup-java@v1
+        uses: actions/setup-java@v3
         with:
+          distribution: 'corretto'
           java-version: 11
       # Enable gradle cache: https://github.com/actions/cache/blob/master/examples.md#java---gradle
-      - uses: actions/cache@v2
+      - uses: actions/cache@v3
         with:
           path: ~/.gradle/caches
           key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
diff --git a/.github/workflows/serving_publish.yml b/.github/workflows/serving_publish.yml
index 5eb1c059f..398e1dba7 100644
--- a/.github/workflows/serving_publish.yml
+++ b/.github/workflows/serving_publish.yml
@@ -20,15 +20,16 @@ jobs:
     runs-on: ubuntu-18.04
 
     steps:
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v3
         with:
           repository: deepjavalibrary/djl-serving
       - name: Set up JDK 11
-        uses: actions/setup-java@v1
+        uses: actions/setup-java@v3
         with:
+          distribution: 'corretto'
           java-version: 11
       # Enable gradle cache: https://github.com/actions/cache/blob/master/examples.md#java---gradle
-      - uses: actions/cache@v2
+      - uses: actions/cache@v3
         with:
           path: ~/.gradle/caches
           key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}


Test patch:
diff --git a/djl-zero/src/test/java/ai/djl/zero/cv/ImageClassificationTest.java b/djl-zero/src/test/java/ai/djl/zero/cv/ImageClassificationTest.java
index 554c68ff3..512adee3c 100644
--- a/djl-zero/src/test/java/ai/djl/zero/cv/ImageClassificationTest.java
+++ b/djl-zero/src/test/java/ai/djl/zero/cv/ImageClassificationTest.java
@@ -33,6 +33,7 @@ public class ImageClassificationTest {
     public void testImageClassificationPretrained()
             throws IOException, ModelNotFoundException, MalformedModelException {
         Class<?>[] inputClasses = {Image.class, Path.class, URL.class, InputStream.class};
+        TestRequirements.notArm();
         TestRequirements.nightly();
 
         for (Class<?> inputClass : inputClasses) {
diff --git a/engines/ml/xgboost/src/test/java/ai/djl/ml/xgboost/XgbModelTest.java b/engines/ml/xgboost/src/test/java/ai/djl/ml/xgboost/XgbModelTest.java
index e354f43ad..521a5e5f5 100644
--- a/engines/ml/xgboost/src/test/java/ai/djl/ml/xgboost/XgbModelTest.java
+++ b/engines/ml/xgboost/src/test/java/ai/djl/ml/xgboost/XgbModelTest.java
@@ -77,9 +77,6 @@ public class XgbModelTest {
 
     @Test
     public void testLoad() throws MalformedModelException, IOException, TranslateException {
-        TestRequirements.notArm();
-        TestRequirements.notWindows();
-
         try (Model model = Model.newInstance("XGBoost")) {
             model.load(Paths.get("build/model"), "regression");
             Predictor<NDList, NDList> predictor = model.newPredictor(new NoopTranslator());
@@ -94,9 +91,6 @@ public class XgbModelTest {
 
     @Test
     public void testNDArray() {
-        TestRequirements.notArm();
-        TestRequirements.notWindows();
-
         try (XgbNDManager manager =
                 (XgbNDManager) XgbNDManager.getSystemManager().newSubManager()) {
             manager.setMissingValue(Float.NaN);
diff --git a/engines/mxnet/mxnet-model-zoo/src/test/java/ai/djl/mxnet/integration/MxSymbolBlockTest.java b/engines/mxnet/mxnet-model-zoo/src/test/java/ai/djl/mxnet/integration/MxSymbolBlockTest.java
index 51ba19539..212fd7992 100644
--- a/engines/mxnet/mxnet-model-zoo/src/test/java/ai/djl/mxnet/integration/MxSymbolBlockTest.java
+++ b/engines/mxnet/mxnet-model-zoo/src/test/java/ai/djl/mxnet/integration/MxSymbolBlockTest.java
@@ -43,6 +43,7 @@ import ai.djl.translate.TranslateException;
 import ai.djl.util.Pair;
 
 import org.testng.Assert;
+import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
 
 import java.io.IOException;
@@ -53,11 +54,14 @@ import java.util.stream.Collectors;
 
 public class MxSymbolBlockTest {
 
+    @BeforeClass
+    public void setUp() {
+        TestRequirements.notArm();
+    }
+
     @Test
     public void testSymbolModelInputOutput()
             throws IOException, ModelException, TranslateException {
-        TestRequirements.notArm();
-
         Criteria<Image, Classifications> criteria =
                 Criteria.builder()
                         .setTypes(Image.class, Classifications.class)
@@ -75,8 +79,6 @@ public class MxSymbolBlockTest {
 
     @Test
     public void testForward() throws IOException, ModelException {
-        TestRequirements.notArm();
-
         Criteria<Image, Classifications> criteria =
                 Criteria.builder()
                         .setTypes(Image.class, Classifications.class)
@@ -99,8 +101,6 @@ public class MxSymbolBlockTest {
 
     @Test
     public void trainWithNewParam() throws IOException, ModelException {
-        TestRequirements.notArm();
-
         if ("MXNet".equals(Engine.getDefaultEngineName())) {
             // TODO: WARN The gradMeans (but not predictions or loss) changed during the upgrade
             // to MXNet 1.8. The issue affect only CPU, but GPU has not changed.
@@ -140,8 +140,6 @@ public class MxSymbolBlockTest {
 
     @Test
     public void trainWithExistParam() throws IOException, ModelException {
-        TestRequirements.notArm();
-
         TrainingConfig config =
                 new DefaultTrainingConfig(Loss.softmaxCrossEntropyLoss())
                         .optInitializer(Initializer.ONES, Parameter.Type.WEIGHT);
@@ -174,8 +172,6 @@ public class MxSymbolBlockTest {
 
     @Test
     public void trainWithCustomLayer() throws IOException, ModelException {
-        TestRequirements.notArm();
-
         TrainingConfig config =
                 new DefaultTrainingConfig(Loss.softmaxCrossEntropyLoss())
                         .optInitializer(Initializer.ONES, Parameter.Type.WEIGHT);
@@ -216,8 +212,6 @@ public class MxSymbolBlockTest {
     }
 
     private Pair<NDArray, NDArray> train(NDManager manager, Trainer trainer, Block block) {
-        TestRequirements.notArm();
-
         Shape inputShape = new Shape(10, 28 * 28);
         trainer.initialize(inputShape);
 
diff --git a/engines/paddlepaddle/paddlepaddle-engine/src/test/java/ai/djl/paddlepaddle/jni/JniUtilsTest.java b/engines/paddlepaddle/paddlepaddle-engine/src/test/java/ai/djl/paddlepaddle/jni/JniUtilsTest.java
index 6ec829739..81de491b1 100644
--- a/engines/paddlepaddle/paddlepaddle-engine/src/test/java/ai/djl/paddlepaddle/jni/JniUtilsTest.java
+++ b/engines/paddlepaddle/paddlepaddle-engine/src/test/java/ai/djl/paddlepaddle/jni/JniUtilsTest.java
@@ -19,14 +19,18 @@ import ai.djl.paddlepaddle.engine.PpNDArray;
 import ai.djl.testing.TestRequirements;
 
 import org.testng.Assert;
+import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
 
 public class JniUtilsTest {
 
-    @Test
-    void createNDArray() {
+    @BeforeClass
+    public void setUp() {
         TestRequirements.notArm();
+    }
 
+    @Test
+    public void createNDArray() {
         try (NDManager manager = NDManager.newBaseManager(null, "PaddlePaddle")) {
             NDArray array = manager.zeros(new Shape(1, 2));
             float[] expected = new float[] {0, 0};
@@ -41,9 +45,7 @@ public class JniUtilsTest {
     }
 
     @Test
-    void testLoD() {
-        TestRequirements.notArm();
-
+    public void testLoD() {
         try (NDManager manager = NDManager.newBaseManager(null, "PaddlePaddle")) {
             PpNDArray array = (PpNDArray) manager.zeros(new Shape(1, 4));
             long[][] lodInfo = new long[][] {new long[] {1, 3}};
diff --git a/engines/paddlepaddle/paddlepaddle-model-zoo/src/test/java/ai/djl/paddlepaddle/zoo/OCRTest.java b/engines/paddlepaddle/paddlepaddle-model-zoo/src/test/java/ai/djl/paddlepaddle/zoo/OCRTest.java
index 84721d125..993f00488 100644
--- a/engines/paddlepaddle/paddlepaddle-model-zoo/src/test/java/ai/djl/paddlepaddle/zoo/OCRTest.java
+++ b/engines/paddlepaddle/paddlepaddle-model-zoo/src/test/java/ai/djl/paddlepaddle/zoo/OCRTest.java
@@ -29,6 +29,7 @@ import ai.djl.repository.zoo.ZooModel;
 import ai.djl.testing.TestRequirements;
 import ai.djl.translate.TranslateException;
 
+import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
 
 import java.io.IOException;
@@ -36,10 +37,13 @@ import java.util.List;
 
 public class OCRTest {
 
-    @Test
-    public void testOCR() throws IOException, ModelException, TranslateException {
+    @BeforeClass
+    public void setUp() {
         TestRequirements.notArm();
+    }
 
+    @Test
+    public void testOCR() throws IOException, ModelException, TranslateException {
         // load Character model
         Predictor<Image, DetectedObjects> detector = getWordDetector();
         Predictor<Image, String> recognizer = getRecognizer();
@@ -65,8 +69,6 @@ public class OCRTest {
 
     private static Predictor<Image, DetectedObjects> getWordDetector()
             throws ModelException, IOException {
-        TestRequirements.notArm();
-
         Criteria<Image, DetectedObjects> criteria =
                 Criteria.builder()
                         .setTypes(Image.class, DetectedObjects.class)
@@ -77,8 +79,6 @@ public class OCRTest {
     }
 
     private static Predictor<Image, String> getRecognizer() throws ModelException, IOException {
-        TestRequirements.notArm();
-
         Criteria<Image, String> criteria =
                 Criteria.builder()
                         .setTypes(Image.class, String.class)
diff --git a/engines/tensorflow/tensorflow-model-zoo/src/test/java/ai/djl/tensorflow/integration/modality/cv/TfSsdTest.java b/engines/tensorflow/tensorflow-model-zoo/src/test/java/ai/djl/tensorflow/integration/modality/cv/TfSsdTest.java
index 3e8937de7..d3342aa34 100644
--- a/engines/tensorflow/tensorflow-model-zoo/src/test/java/ai/djl/tensorflow/integration/modality/cv/TfSsdTest.java
+++ b/engines/tensorflow/tensorflow-model-zoo/src/test/java/ai/djl/tensorflow/integration/modality/cv/TfSsdTest.java
@@ -33,6 +33,7 @@ import ai.djl.translate.TranslateException;
 import ai.djl.util.Pair;
 
 import org.testng.Assert;
+import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
 
 import java.io.IOException;
@@ -44,10 +45,13 @@ import java.util.stream.Collectors;
 
 public class TfSsdTest {
 
-    @Test
-    public void testTfSSD() throws IOException, ModelException, TranslateException {
+    @BeforeClass
+    public void setUp() {
         TestRequirements.notArm();
+    }
 
+    @Test
+    public void testTfSSD() throws IOException, ModelException, TranslateException {
         Criteria<Image, DetectedObjects> criteria =
                 Criteria.builder()
                         .optApplication(Application.CV.OBJECT_DETECTION)
@@ -96,8 +100,6 @@ public class TfSsdTest {
 
     @Test
     public void testStringInputOutput() throws IOException, ModelException, TranslateException {
-        TestRequirements.notArm();
-
         Criteria<NDList, NDList> criteria =
                 Criteria.builder()
                         .optApplication(Application.CV.OBJECT_DETECTION)
diff --git a/extensions/fasttext/src/test/java/ai/djl/fasttext/CookingStackExchangeTest.java b/extensions/fasttext/src/test/java/ai/djl/fasttext/CookingStackExchangeTest.java
index 379409933..99328a830 100644
--- a/extensions/fasttext/src/test/java/ai/djl/fasttext/CookingStackExchangeTest.java
+++ b/extensions/fasttext/src/test/java/ai/djl/fasttext/CookingStackExchangeTest.java
@@ -36,6 +36,7 @@ import ai.djl.translate.TranslateException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.testng.Assert;
+import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
 
 import java.io.IOException;
@@ -53,11 +54,14 @@ public class CookingStackExchangeTest {
 
     private static final Logger logger = LoggerFactory.getLogger(CookingStackExchangeTest.class);
 
-    @Test
-    public void testTrainTextClassification() throws IOException {
+    @BeforeClass
+    public void setUp() {
         TestRequirements.notWindows(); // fastText is not supported on windows
         TestRequirements.notArm();
+    }
 
+    @Test
+    public void testTrainTextClassification() throws IOException {
         CookingStackExchange dataset = CookingStackExchange.builder().build();
 
         // setup training configuration
@@ -79,9 +83,6 @@ public class CookingStackExchangeTest {
     public void testTextClassification()
             throws IOException, MalformedModelException, ModelNotFoundException,
                     TranslateException {
-        TestRequirements.notWindows(); // fastText is not supported on windows
-        TestRequirements.notArm();
-
         Criteria<String, Classifications> criteria =
                 Criteria.builder()
                         .setTypes(String.class, Classifications.class)
@@ -105,9 +106,6 @@ public class CookingStackExchangeTest {
 
     @Test
     public void testWord2Vec() throws IOException, MalformedModelException, ModelNotFoundException {
-        TestRequirements.notWindows(); // fastText is not supported on windows
-        TestRequirements.notArm();
-
         Criteria<String, Classifications> criteria =
                 Criteria.builder()
                         .setTypes(String.class, Classifications.class)
@@ -128,8 +126,6 @@ public class CookingStackExchangeTest {
 
     @Test
     public void testBlazingText() throws IOException, ModelException {
-        TestRequirements.notWindows(); // fastText is not supported on windows
-        TestRequirements.notArm();
         TestRequirements.nightly();
 
         URL url = new URL("https://resources.djl.ai/test-models/blazingtext_classification.bin");
diff --git a/extensions/opencv/src/test/java/ai/djl/opencv/OpenCVImageFactoryTest.java b/extensions/opencv/src/test/java/ai/djl/opencv/OpenCVImageFactoryTest.java
index 14e822148..cb0d4dc52 100644
--- a/extensions/opencv/src/test/java/ai/djl/opencv/OpenCVImageFactoryTest.java
+++ b/extensions/opencv/src/test/java/ai/djl/opencv/OpenCVImageFactoryTest.java
@@ -27,6 +27,7 @@ import ai.djl.testing.TestRequirements;
 
 import org.opencv.core.Mat;
 import org.testng.Assert;
+import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
 
 import java.awt.Color;
@@ -42,11 +43,14 @@ import java.util.List;
 
 public class OpenCVImageFactoryTest {
 
-    @Test
-    public void testImage() throws IOException {
+    @BeforeClass
+    public void setUp() {
         TestRequirements.notWindows(); // failed on Windows ServerCore container
         TestRequirements.notArm();
+    }
 
+    @Test
+    public void testImage() throws IOException {
         ImageFactory factory = ImageFactory.getInstance();
         ImageFactory defFactory = new BufferedImageFactory();
         Path path = Paths.get("../../examples/src/test/resources/kitten.jpg");
@@ -132,9 +136,6 @@ public class OpenCVImageFactoryTest {
 
     @Test
     public void testBoundingBoxes() {
-        TestRequirements.notWindows(); // failed on Windows ServerCore container
-        TestRequirements.notArm();
-
         ImageFactory factory = ImageFactory.getInstance();
         try (NDManager manager = NDManager.newBaseManager()) {
             int[][] arr =
@@ -161,8 +162,6 @@ public class OpenCVImageFactoryTest {
 
     @Test
     public void testDrawImage() throws IOException {
-        TestRequirements.notWindows(); // failed on Windows ServerCore container
-        TestRequirements.notArm();
         ImageFactory factory = ImageFactory.getInstance();
         int[] pixels = new int[64];
         int index = 0;
diff --git a/extensions/timeseries/src/test/java/ai/djl/timeseries/block/BlockTest.java b/extensions/timeseries/src/test/java/ai/djl/timeseries/block/BlockTest.java
index 045704484..0e4795b91 100644
--- a/extensions/timeseries/src/test/java/ai/djl/timeseries/block/BlockTest.java
+++ b/extensions/timeseries/src/test/java/ai/djl/timeseries/block/BlockTest.java
@@ -20,10 +20,12 @@ import ai.djl.ndarray.types.DataType;
 import ai.djl.ndarray.types.Shape;
 import ai.djl.nn.Parameter;
 import ai.djl.testing.Assertions;
+import ai.djl.testing.TestRequirements;
 import ai.djl.training.ParameterStore;
 import ai.djl.training.initializer.Initializer;
 
 import org.testng.Assert;
+import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
 
 import java.util.Arrays;
@@ -31,6 +33,12 @@ import java.util.List;
 
 public class BlockTest {
 
+    @BeforeClass
+    public void setUp() {
+        // TODO: Remove this once we support PyTorch support for timeseries extension
+        TestRequirements.notArm();
+    }
+
     @Test
     public void testFeature() {
         int n = 10;
diff --git a/extensions/timeseries/src/test/java/ai/djl/timeseries/dataset/M5ForecastTest.java b/extensions/timeseries/src/test/java/ai/djl/timeseries/dataset/M5ForecastTest.java
index 7779f8fb2..1536f3062 100644
--- a/extensions/timeseries/src/test/java/ai/djl/timeseries/dataset/M5ForecastTest.java
+++ b/extensions/timeseries/src/test/java/ai/djl/timeseries/dataset/M5ForecastTest.java
@@ -21,6 +21,7 @@ import ai.djl.ndarray.NDList;
 import ai.djl.ndarray.NDManager;
 import ai.djl.nn.Blocks;
 import ai.djl.nn.Parameter;
+import ai.djl.testing.TestRequirements;
 import ai.djl.timeseries.transform.TimeSeriesTransform;
 import ai.djl.training.DefaultTrainingConfig;
 import ai.djl.training.Trainer;
@@ -33,6 +34,7 @@ import ai.djl.training.loss.Loss;
 import ai.djl.translate.TranslateException;
 
 import org.testng.Assert;
+import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
 
 import java.io.IOException;
@@ -41,6 +43,12 @@ import java.util.List;
 
 public class M5ForecastTest {
 
+    @BeforeClass
+    public void setUp() {
+        // TODO: Remove this once we support PyTorch support for timeseries extension
+        TestRequirements.notArm();
+    }
+
     /*
      * Here for the purpose of unittest, we use the M5 forecast unittest dataset.
      * The real data needs to be downloaded from:
diff --git a/extensions/timeseries/src/test/java/ai/djl/timeseries/distribution/DistributionTest.java b/extensions/timeseries/src/test/java/ai/djl/timeseries/distribution/DistributionTest.java
index 8708fad66..ecb470a2a 100644
--- a/extensions/timeseries/src/test/java/ai/djl/timeseries/distribution/DistributionTest.java
+++ b/extensions/timeseries/src/test/java/ai/djl/timeseries/distribution/DistributionTest.java
@@ -17,11 +17,19 @@ import ai.djl.ndarray.NDArray;
 import ai.djl.ndarray.NDList;
 import ai.djl.ndarray.NDManager;
 import ai.djl.testing.Assertions;
+import ai.djl.testing.TestRequirements;
 
+import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
 
 public class DistributionTest {
 
+    @BeforeClass
+    public void setUp() {
+        // TODO: Remove this once we support PyTorch support for timeseries extension
+        TestRequirements.notArm();
+    }
+
     @Test
     public void testNegativeBinomial() {
         try (NDManager manager = NDManager.newBaseManager()) {
diff --git a/extensions/timeseries/src/test/java/ai/djl/timeseries/evaluator/RmsseTest.java b/extensions/timeseries/src/test/java/ai/djl/timeseries/evaluator/RmsseTest.java
index 71f42eafd..21dfc6d48 100644
--- a/extensions/timeseries/src/test/java/ai/djl/timeseries/evaluator/RmsseTest.java
+++ b/extensions/timeseries/src/test/java/ai/djl/timeseries/evaluator/RmsseTest.java
@@ -16,16 +16,19 @@ package ai.djl.timeseries.evaluator;
 import ai.djl.ndarray.NDArray;
 import ai.djl.ndarray.NDList;
 import ai.djl.ndarray.NDManager;
+import ai.djl.testing.TestRequirements;
 import ai.djl.timeseries.distribution.output.NegativeBinomialOutput;
 
 import org.testng.Assert;
+import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
 
 public class RmsseTest {
 
-    public static void main(String[] args) {
-        RmsseTest t = new RmsseTest();
-        t.testRmsse();
+    @BeforeClass
+    public void setUp() {
+        // TODO: Remove this once we support PyTorch support for timeseries extension
+        TestRequirements.notArm();
     }
 
     @Test
diff --git a/extensions/timeseries/src/test/java/ai/djl/timeseries/model/DeepARTest.java b/extensions/timeseries/src/test/java/ai/djl/timeseries/model/DeepARTest.java
index 08cccb9e9..e3977215f 100644
--- a/extensions/timeseries/src/test/java/ai/djl/timeseries/model/DeepARTest.java
+++ b/extensions/timeseries/src/test/java/ai/djl/timeseries/model/DeepARTest.java
@@ -23,6 +23,7 @@ import ai.djl.ndarray.NDManager;
 import ai.djl.ndarray.types.DataType;
 import ai.djl.ndarray.types.Shape;
 import ai.djl.nn.Parameter;
+import ai.djl.testing.TestRequirements;
 import ai.djl.timeseries.dataset.FieldName;
 import ai.djl.timeseries.dataset.M5Forecast;
 import ai.djl.timeseries.dataset.TimeFeaturizers;
@@ -46,6 +47,7 @@ import ai.djl.translate.TranslateException;
 import ai.djl.util.PairList;
 
 import org.testng.Assert;
+import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
 
 import java.io.IOException;
@@ -60,9 +62,10 @@ public class DeepARTest {
     private static int predictionLength = 4;
     private static String freq = "D";
 
-    public static void main(String[] args) throws TranslateException, IOException {
-        DeepARTest test = new DeepARTest();
-        test.testPredictionTransformation();
+    @BeforeClass
+    public void setUp() {
+        // TODO: Remove this once we support PyTorch support for timeseries extension
+        TestRequirements.notArm();
     }
 
     @Test
diff --git a/extensions/timeseries/src/test/java/ai/djl/timeseries/transform/TransformTest.java b/extensions/timeseries/src/test/java/ai/djl/timeseries/transform/TransformTest.java
index 0a840fcc4..3db56f0f8 100644
--- a/extensions/timeseries/src/test/java/ai/djl/timeseries/transform/TransformTest.java
+++ b/extensions/timeseries/src/test/java/ai/djl/timeseries/transform/TransformTest.java
@@ -40,6 +40,7 @@ public class TransformTest {
 
     @BeforeClass
     public void setUp() {
+        // TODO: Remove this once we support PyTorch support for timeseries extension
         TestRequirements.notArm();
     }
 
diff --git a/extensions/timeseries/src/test/java/ai/djl/timeseries/translator/DeepARTranslatorTest.java b/extensions/timeseries/src/test/java/ai/djl/timeseries/translator/DeepARTranslatorTest.java
index 2ffa2ba7d..88e4bc993 100644
--- a/extensions/timeseries/src/test/java/ai/djl/timeseries/translator/DeepARTranslatorTest.java
+++ b/extensions/timeseries/src/test/java/ai/djl/timeseries/translator/DeepARTranslatorTest.java
@@ -37,6 +37,7 @@ public class DeepARTranslatorTest {
 
     @Test
     public void testDeepARTranslator() throws IOException, TranslateException, ModelException {
+        // TODO: Remove this once we support PyTorch support for timeseries extension
         TestRequirements.notArm();
 
         String modelUrl = "https://resources.djl.ai/test-models/mxnet/timeseries/deepar.zip";
diff --git a/extensions/timeseries/src/test/java/ai/djl/timeseries/translator/TransformerTranslatorTest.java b/extensions/timeseries/src/test/java/ai/djl/timeseries/translator/TransformerTranslatorTest.java
index db6f22c6a..8693000d9 100644
--- a/extensions/timeseries/src/test/java/ai/djl/timeseries/translator/TransformerTranslatorTest.java
+++ b/extensions/timeseries/src/test/java/ai/djl/timeseries/translator/TransformerTranslatorTest.java
@@ -37,6 +37,7 @@ public class TransformerTranslatorTest {
 
     @Test
     public void testTransformerTranslator() throws IOException, TranslateException, ModelException {
+        // TODO: Remove this once we support PyTorch support for timeseries extension
         TestRequirements.notArm();
 
         String modelUrl = "https://resources.djl.ai/test-models/mxnet/timeseries/transformer.zip";