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

TSPS-150 add tests for JobApiUtils #51

Merged
merged 2 commits into from
Jan 30, 2024

Conversation

mmorgantaylor
Copy link
Collaborator

Description

Added a test class for JobApiUtils, and in the process refactored some commonly used test variables and methods into StairwayTestUtils.

Jira Ticket

https://broadworkbench.atlassian.net/browse/TSPS-150

Copy link

sonarcloud bot commented Jan 29, 2024

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link
Collaborator

@jsotobroad jsotobroad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice, lots of testing!

FlightStatus.FATAL, TestUtils.TEST_NEW_UUID);
flightState.setException(new InternalStairwayException("some message"));

ApiJobReport apiJobReport = JobApiUtils.mapFlightStateToApiJobReport(flightState);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

huh im kind of surprised the ApiJobReport doesnt report the exception message.

Copy link
Collaborator Author

@mmorgantaylor mmorgantaylor Jan 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was too. the spec defines the JobReport as the response for "get job status", and you have to call "get job result" to get the ErrorReport (that contains the error message and causes). we could consider adding the error message to JobReport, or we could create the "get job result" endpoint such that it can be used for polling, and if you use that one you'll get the ErrorReport. I'd lean toward the latter but we can discuss and make another ticket if needed.

@mmorgantaylor mmorgantaylor merged commit b991043 into main Jan 30, 2024
13 checks passed
@mmorgantaylor mmorgantaylor deleted the TSPS-150_mma_test_JobApiUtils branch January 30, 2024 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants