Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

moved integration test to unit test #3968

Merged
merged 9 commits into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .github/workflows/check-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
gpg-private-key: ${{ secrets.OSSRH_GPG_KEY }}
gpg-passphrase: ${{ secrets.OSSRH_GPG_PASSPHRASE }}
- name: Check PR
run: sbt --mem 10240 --batch ";checkPR;completeQaseRun"
run: sbt -J-Xlog:gc*=debug:file=./gc.log --mem 8096 --batch ";checkPR;completeQaseRun"
env:
QASE_ENABLE: true
QASE_RUN_NAME: checkPR
Expand Down Expand Up @@ -56,3 +56,13 @@ jobs:
sbt_version=$(cut -d\" -f2 version.sbt)
pr_number=${{ github.event.number }}
sbt -Dproject.version=$sbt_version-$pr_number-SNAPSHOT --mem 4096 --batch publishSigned
- name: Save debug data
uses: actions/upload-artifact@v4
if: always()
with:
if-no-files-found: ignore
name: debug-data
path: |
gc.log
hs*.log
core*
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import com.wavesplatform.lang.directives.values.V3
import com.wavesplatform.lang.utils.*
import com.wavesplatform.lang.v1.estimator.v2.ScriptEstimatorV2

import java.util.concurrent.Semaphore

class ScriptEstimatorV2Test extends ScriptEstimatorTestBase(ScriptEstimatorV2) {
property("transitive ref usage") {
def estimateRefUsage(ref: String): Long = {
Expand Down Expand Up @@ -62,16 +64,18 @@ class ScriptEstimatorV2Test extends ScriptEstimatorTestBase(ScriptEstimatorV2) {
""".stripMargin

@volatile var r: Either[String, Long] = Right(0)
val s = new Semaphore(0)
val run: Runnable = { () =>
s.release()
r = estimate(functionCosts(V3), compile(hangingScript))
}
val t = new Thread(run)
t.setDaemon(true)

t.start()
Thread.sleep(5000)
s.acquire()
t.interrupt()
Thread.sleep(500)
t.join()

r shouldBe Left("Script estimation was interrupted")
t.getState shouldBe Thread.State.TERMINATED
Expand Down

This file was deleted.

Loading