diff --git a/.github/workflows/daily_build.yml b/.github/workflows/daily_build.yml index 4547fb733abe..09c8d963683f 100644 --- a/.github/workflows/daily_build.yml +++ b/.github/workflows/daily_build.yml @@ -44,6 +44,7 @@ jobs: env: packageUser: ${{ github.actor }} packagePAT: ${{ secrets.GITHUB_TOKEN }} + LS_PERFORMANCE_TESTS_IN_GITHUB_WORKFLOW: true run: | export DISPLAY=':99.0' /usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & diff --git a/.github/workflows/nightly_publish_timestamped_release.yml b/.github/workflows/nightly_publish_timestamped_release.yml index 6cf915c37084..d42e9c6be5dd 100644 --- a/.github/workflows/nightly_publish_timestamped_release.yml +++ b/.github/workflows/nightly_publish_timestamped_release.yml @@ -44,6 +44,7 @@ jobs: env: publishUser: ${{ secrets.BALLERINA_BOT_USERNAME }} publishPAT: ${{ secrets.BALLERINA_BOT_TOKEN }} + LS_PERFORMANCE_TESTS_IN_GITHUB_WORKFLOW: true run: | ./gradlew clean build -x createJavadoc --scan --continue --rerun-tasks ./gradlew publish diff --git a/.github/workflows/pull_request_full_build.yml b/.github/workflows/pull_request_full_build.yml index cdc5746c7353..4901633434a4 100644 --- a/.github/workflows/pull_request_full_build.yml +++ b/.github/workflows/pull_request_full_build.yml @@ -35,6 +35,8 @@ jobs: echo "::set-output name=version::$VERSION" - name: Build ballerina-lang + env: + LS_PERFORMANCE_TESTS_IN_GITHUB_WORKFLOW: true run: | ./gradlew clean build -x check publishToMavenLocal --stacktrace --scan diff --git a/.github/workflows/pull_request_ubuntu_build.yml b/.github/workflows/pull_request_ubuntu_build.yml index 5bdf8e1e7fee..ee6fe33bf0bd 100644 --- a/.github/workflows/pull_request_ubuntu_build.yml +++ b/.github/workflows/pull_request_ubuntu_build.yml @@ -58,6 +58,7 @@ jobs: env: packageUser: ${{ github.actor }} packagePAT: ${{ secrets.GITHUB_TOKEN }} + LS_PERFORMANCE_TESTS_IN_GITHUB_WORKFLOW: true run: | export DISPLAY=':99.0' /usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & diff --git a/.github/workflows/pull_request_windows_build.yml b/.github/workflows/pull_request_windows_build.yml index 4f42987df8a5..b0e64d4b0507 100644 --- a/.github/workflows/pull_request_windows_build.yml +++ b/.github/workflows/pull_request_windows_build.yml @@ -55,5 +55,6 @@ jobs: env: packageUser: ${{ github.actor }} packagePAT: ${{ secrets.GITHUB_TOKEN }} + LS_PERFORMANCE_TESTS_IN_GITHUB_WORKFLOW: true run: ./gradlew.bat build --continue -x :ballerina-lang:test -x :jballerina-integration-test:test -x :ballerina-shell:shell-cli:test -x :ballerina-cli:test -x createJavadoc --stacktrace -scan --console=plain --no-daemon --no-parallel diff --git a/.github/workflows/push_master.yml b/.github/workflows/push_master.yml index a527a28520a9..9f229fc39344 100644 --- a/.github/workflows/push_master.yml +++ b/.github/workflows/push_master.yml @@ -36,6 +36,8 @@ jobs: restore-keys: ${{ runner.os }}-gradle - name: Build with Gradle + env: + LS_PERFORMANCE_TESTS_IN_GITHUB_WORKFLOW: true run: | export DISPLAY=':99.0' /usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & @@ -78,6 +80,8 @@ jobs: restore-keys: ${{ runner.os }}-gradle - name: Build with Gradle + env: + LS_PERFORMANCE_TESTS_IN_GITHUB_WORKFLOW: true run: ./gradlew.bat build --continue -x :ballerina-lang:test -x :jballerina-integration-test:test -x :ballerina-shell:shell-cli:test -x :jballerina-debugger-integration-test:test -x createJavadoc --stacktrace -scan --console=plain --no-daemon --no-parallel diff --git a/language-server/modules/langserver-core/build.gradle b/language-server/modules/langserver-core/build.gradle index 5bcbde146302..71c25ba65bd9 100644 --- a/language-server/modules/langserver-core/build.gradle +++ b/language-server/modules/langserver-core/build.gradle @@ -148,7 +148,11 @@ test { systemProperty "ballerina.home", "$buildDir/" systemProperty "experimental", "true" systemProperty "ballerina.version", project.version - systemProperty "responseTimeThreshold", 2000 + if (System.getenv('LS_PERFORMANCE_TESTS_IN_GITHUB_WORKFLOW')) { + systemProperty "responseTimeThreshold", 4000 + } else { + systemProperty "responseTimeThreshold", 400 + } useTestNG() { suites 'src/test/resources/testng.xml' } diff --git a/language-server/modules/langserver-core/src/test/java/org/ballerinalang/langserver/codeaction/CodeActionPerformanceTest.java b/language-server/modules/langserver-core/src/test/java/org/ballerinalang/langserver/codeaction/CodeActionPerformanceTest.java index 2e34f11c32e9..b870049b095e 100644 --- a/language-server/modules/langserver-core/src/test/java/org/ballerinalang/langserver/codeaction/CodeActionPerformanceTest.java +++ b/language-server/modules/langserver-core/src/test/java/org/ballerinalang/langserver/codeaction/CodeActionPerformanceTest.java @@ -40,7 +40,7 @@ public String getResourceDir() { } @Override - @Test(dataProvider = "codeaction-data-provider", enabled = false) + @Test(dataProvider = "codeaction-data-provider") public void test(String config) throws IOException, WorkspaceDocumentException { super.test(config); } diff --git a/language-server/modules/langserver-core/src/test/java/org/ballerinalang/langserver/completion/CompletionPerformanceTest.java b/language-server/modules/langserver-core/src/test/java/org/ballerinalang/langserver/completion/CompletionPerformanceTest.java index 411eec31315b..45568a9b89f9 100644 --- a/language-server/modules/langserver-core/src/test/java/org/ballerinalang/langserver/completion/CompletionPerformanceTest.java +++ b/language-server/modules/langserver-core/src/test/java/org/ballerinalang/langserver/completion/CompletionPerformanceTest.java @@ -37,7 +37,7 @@ */ public class CompletionPerformanceTest extends CompletionTest { - @Test(dataProvider = "completion-data-provider", enabled = false) + @Test(dataProvider = "completion-data-provider") @Override public void test(String config, String configPath) throws WorkspaceDocumentException, IOException { super.test(config, configPath); diff --git a/language-server/modules/langserver-core/src/test/java/org/ballerinalang/langserver/hover/HoverPerformanceTest.java b/language-server/modules/langserver-core/src/test/java/org/ballerinalang/langserver/hover/HoverPerformanceTest.java index 66392bc5f024..5281ee445d76 100644 --- a/language-server/modules/langserver-core/src/test/java/org/ballerinalang/langserver/hover/HoverPerformanceTest.java +++ b/language-server/modules/langserver-core/src/test/java/org/ballerinalang/langserver/hover/HoverPerformanceTest.java @@ -39,7 +39,7 @@ public class HoverPerformanceTest extends HoverProviderTest { private final List executionTimes = new ArrayList<>(); - @Test(description = "Test Hover provider", dataProvider = "hover-data-provider", enabled = false) + @Test(description = "Test Hover provider", dataProvider = "hover-data-provider") public void testHover(String config) throws IOException { // We run the same test multiple times and take the average of them as the execution time. This is to // reduce the effect of first compilation and outliers