Skip to content

Commit

Permalink
Merge branch 'version-1.5.x' into remove-lens-attempt-1
Browse files Browse the repository at this point in the history
  • Loading branch information
vladimirlogachev authored Sep 27, 2024
2 parents ac87d73 + 1fa1513 commit 4acb471
Show file tree
Hide file tree
Showing 8 changed files with 80 additions and 551 deletions.
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

0 comments on commit 4acb471

Please sign in to comment.