Skip to content

Commit

Permalink
Reverting the addition of timeout in bazel execute as that wasn't ref…
Browse files Browse the repository at this point in the history
…lected in the tests
  • Loading branch information
Rd4dev committed Jul 1, 2024
1 parent 8ec6b7c commit fe642a6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ jobs:
while [ $i -ne 5 ]; do
i=$(( $i+1 ))
echo "Attempt $i/5 to run test targets"
bazel test --keep_going --remote_http_cache=$BAZEL_REMOTE_CACHE_URL --google_credentials=./config/oppia-dev-workflow-remote-cache-credentials.json -- $BAZEL_TEST_TARGETS
bazel test --keep_going --test_timeout=600 --remote_http_cache=$BAZEL_REMOTE_CACHE_URL --google_credentials=./config/oppia-dev-workflow-remote-cache-credentials.json -- $BAZEL_TEST_TARGETS
done
# Capture the error code of the final command run (which should be a success if there isn't a real build failure).
last_error_code=$?
Expand All @@ -307,7 +307,7 @@ jobs:
while [ $i -ne 5 ]; do
i=$(( $i+1 ))
echo "Attempt $i/5 to run test targets"
bazel test --keep_going -- $BAZEL_TEST_TARGETS
bazel test --keep_going --test_timeout=600 -- $BAZEL_TEST_TARGETS
done
# Capture the error code of the final command run (which should be a success if there isn't a real build failure).
last_error_code=$?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ class BazelClient(private val rootDirectory: File, private val commandExecutor:
"coverage",
bazelTestTarget,
"--instrumentation_filter=$computeInstrumentation",
"--test_timeout=300"
)
return parseCoverageDataFilePath(coverageCommandOutputLines)?.let { path ->
File(path).readLines()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -334,16 +334,15 @@ class RunCoverageTest {
testSubpackage = "coverage/test/java/com/example"
)

RunCoverage(
main(
"${tempFolder.root}",
"coverage/main/java/com/example/TwoSum.kt",
ReportFormat.MARKDOWN,
sampleMDOutputPath,
longCommandExecutor,
scriptBgDispatcher
).execute()
)

val outputReportText = File(sampleMDOutputPath).readText()
val outputReportText = File(
"${tempFolder.root}" +
"/coverage_reports/coverage/main/java/com/example/TwoSum/coverage.md"
).readText()

val expectedResult =
"""
Expand Down

0 comments on commit fe642a6

Please sign in to comment.