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

test: block parser spec longer timeout for container #6583

Merged
merged 1 commit into from
Sep 12, 2023
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import matchers.should._
import org.scalatest.matchers.must.Matchers.contain
import org.scalatest.matchers.should.Matchers.convertToAnyShouldWrapper
import funspec._

import com.dimafeng.testcontainers.{ForAllTestContainer, GenericContainer}
import com.dimafeng.testcontainers.GenericContainer.FileSystemBind
import org.testcontainers.containers.wait.strategy.LogMessageWaitStrategy
Expand All @@ -15,6 +14,7 @@ import java.io.File
import java.nio.charset.StandardCharsets
import org.apache.commons.io.IOUtils

import java.time.Duration
import scala.io.Source

class BlockReadableSpec extends AnyFunSpec with Matchers {
Expand Down Expand Up @@ -306,17 +306,21 @@ class GolangContainerSpec extends AnyFunSpec with ForAllTestContainer {
override val container: GenericContainer = GenericContainer(
"golang:1.20.6-alpine",
classpathResourceMapping = Seq(
FileSystemBind("parser-test/sst_files_generator.go", "/local/sst_files_generator.go", BindMode.READ_WRITE),
FileSystemBind("parser-test/sst_files_generator.go",
"/local/sst_files_generator.go",
BindMode.READ_WRITE
),
FileSystemBind("parser-test/go.mod", "/local/go.mod", BindMode.READ_WRITE),
FileSystemBind("parser-test/go.sum", "/local/go.sum", BindMode.READ_WRITE)
),
command = Seq("/bin/sh",
"-c",
"cd /local && CGO_ENABLED=0 go run sst_files_generator.go && echo \"done\""
),
waitStrategy = new LogMessageWaitStrategy().withRegEx(
"done\\n"
) // TODO(Tals): use startupCheckStrategy instead of waitStrategy (https://github.com/treeverse/lakeFS/issues/2455)
// TODO(Tals): use startupCheckStrategy instead of waitStrategy (https://github.com/treeverse/lakeFS/issues/2455)
waitStrategy = new LogMessageWaitStrategy()
.withRegEx("done\\n")
.withStartupTimeout(Duration.ofSeconds(120))
)

describe("A block parser") {
Expand Down