Skip to content

Commit

Permalink
[Release Test] Add smoke_test field to release test report (ray-proje…
Browse files Browse the repository at this point in the history
…ct#24749)

Distinguish smoke test and normal test.
  • Loading branch information
jjyao authored May 16, 2022
1 parent 68a9a33 commit 6f14b6a
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions release/ray_release/glue.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ def run_release_test(

result.wheels_url = ray_wheels_url
result.stable = test.get("stable", True)
result.smoke_test = smoke_test

buildkite_url = os.getenv("BUILDKITE_BUILD_URL", "")
if buildkite_url:
Expand Down
1 change: 1 addition & 0 deletions release/ray_release/reporter/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def report_result(self, test: Test, result: Result):
"runtime": result.runtime or -1.0,
"stable": result.stable,
"return_code": result.return_code,
"smoke_test": result.smoke_test,
}

logger.debug(f"Result json: {json.dumps(result_json)}")
Expand Down
1 change: 1 addition & 0 deletions release/ray_release/result.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ class Result:

runtime: Optional[float] = None
stable: bool = True
smoke_test: bool = False

buildkite_url: Optional[str] = None
wheels_url: Optional[str] = None
Expand Down
12 changes: 12 additions & 0 deletions release/ray_release/tests/test_glue.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,18 @@ def testTestCommandTimeoutLongRunning(self):
# Ensure cluster was terminated
self.assertGreaterEqual(self.sdk.call_counter["terminate_cluster"], 1)

def testSmokeUnstableTest(self):
result = Result()

self._succeed_until("complete")

self.test["stable"] = False
self._run(result, smoke_test=True)

# Ensure stable and smoke_test are set correctly.
assert not result.stable
assert result.smoke_test

def testFetchResultFails(self):
result = Result()

Expand Down

0 comments on commit 6f14b6a

Please sign in to comment.