0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

scala MultiProjectでの直列テスト実行

Posted at

久しぶりにscalaを書いてtest時のエラーが発生。
testを2回やると失敗する事が発生したのだけどよくあるパターン

build.sbtのprojectのクラスの並列テスト実行抑制

parallelExecution in Test := false // DBの関係で今はfalseに

これは知ってたのだけど、現在作りかけのサンプルでMultiProjectで
DBアクセスをするとProject毎には↑を設定してもProject単位では並列でエラーになった。

build.sbtのproject毎の並列テスト実行抑制

concurrentRestrictions in Global := Seq(Tags.limitAll(1))

ただこれMultiだとすべて直列になっちゃうのでテスト時間が増えちゃいます。

ただとりあえず今は!!ってなのでメモがてら投稿

ちなみに

  • java11
  • sbt1.2.8
    最新とかそういうので発生してるかも知れないので記載
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?