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

IWF-472: Fix all the panic and enable test coverage #535

Merged
merged 14 commits into from
Jan 29, 2025

Conversation

samuel27m
Copy link
Member

@samuel27m samuel27m commented Jan 24, 2025

Description

Checklist

  • Code compiles correctly
  • Tests for the changes have been added
  • All tests passing
  • This PR change is backwards-compatible
  • This PR CONTAINS a (planned) breaking change (it is not backwards compatible)

Related Issue

Closes #446

@@ -17,6 +17,9 @@ import (
)

func TestLockingWorkflowTemporal(t *testing.T) {
// TODO: Remove this line to enable the test
t.Skip("TestLockingWorkflowTemporal - Skipping this test - See: https://github.com/indeedeng/iwf/issues/536")
Copy link
Member Author

@samuel27m samuel27m Jan 27, 2025

Choose a reason for hiding this comment

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

It seems that this test has been failing for a while, created an issue to fix this in the future: #536

I believe that before the tests passes because the panic's would somehow recover, and after I added the t.Fatalf calls that actually mark the tests as failed the right way, it always fails the pipeline

@lwolczynski lwolczynski force-pushed the jira/scacador/IWF-472 branch 3 times, most recently from 022d86f to 3456615 Compare January 28, 2025 18:15
@lwolczynski lwolczynski force-pushed the jira/scacador/IWF-472 branch from 3456615 to 38bac14 Compare January 28, 2025 19:00
Copy link

codecov bot commented Jan 29, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 64.56%. Comparing base (a303990) to head (9c80366).
Report is 63 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #535      +/-   ##
==========================================
- Coverage   72.15%   64.56%   -7.60%     
==========================================
  Files          56       59       +3     
  Lines        5043     6617    +1574     
==========================================
+ Hits         3639     4272     +633     
- Misses       1138     2066     +928     
- Partials      266      279      +13     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@samuel27m samuel27m marked this pull request as ready for review January 29, 2025 12:17
@samuel27m
Copy link
Member Author

In summary:

  • Removed panic calls from tests, and started using the test suite way of failing tests t.Fatalf
  • Refactored functions to pass the test suite t context around, so that we can also fail tests from the routers.go files
  • Updated codecov GH action to include the token, and updated version. The coverage upload hasn't been working for a while I believe.

On others notes:

@@ -0,0 +1,11 @@
package helpers
Copy link
Contributor

Choose a reason for hiding this comment

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

Q: should this be in the integ package similarly to util.go?

Copy link
Member Author

@samuel27m samuel27m Jan 29, 2025

Choose a reason for hiding this comment

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

I did that at first, but it creates a circular dependency, because the helper error functions are also used in the routers files for each test.

i.e. Package integ has a test file, that test file imports the routers package for that test e.g. wf_stop.NewHandler() and then that package would include integ again to call the error helper, thus creating a circular dependency

@samuel27m samuel27m merged commit 2a439d5 into main Jan 29, 2025
9 of 10 checks passed
@samuel27m samuel27m deleted the jira/scacador/IWF-472 branch January 29, 2025 15:48
@samuel27m
Copy link
Member Author

Closes #446

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.

Fix all the panic and enable test coverage
2 participants