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

tremor-cli/test: Refactor large parts of the test code. #1305

Closed

Conversation

MordecaiMalignatus
Copy link
Contributor

Pull request

Description

This is a refactoring of large parts of test.rs, in order to make the code more readable and to get rid of one of the very long functions mentioned in #20. It's essentially a spillover from my other patch at #1283.

Tests are still rather hard to write for this (since I didn't touch the functionality), but it's starting to be easier to test and it might end up with being able to test parts of the testing module. I've done my best to

There is no external impact to this change except for 1-2 added messages when something is skipped.

Related

Checklist

  • The RFC, if required, has been submitted and approved
  • Any user-facing impact of the changes is reflected in docs.tremor.rs
  • The code is tested
  • Use of unsafe code is reasoned about in a comment
  • (N/A) Update CHANGELOG.md appropriately, recording any changes, bug fixes, or other observable changes in behavior
  • (N/A) The performance impact of the change is measured (see below)

Performance

Performance impact should not occur, and if anything be very mildly positive from removing a couple of duplicate checks :)

@MordecaiMalignatus
Copy link
Contributor Author

I'm confused by the CI error, the only appearance of that string is in before.rs and it seems to have something to do with how long the tests take? Given that it's in the same area it's something I maybe broke on accident, but I'm not sure how.

@MordecaiMalignatus MordecaiMalignatus force-pushed the refactor branch 2 times, most recently from bf092d0 to 9bb8ccd Compare October 28, 2021 06:41
@coveralls
Copy link
Collaborator

coveralls commented Oct 28, 2021

Pull Request Test Coverage Report for Build 1393410269

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.03%) to 87.315%

Totals Coverage Status
Change from base Build 1390153709: 0.03%
Covered Lines: 18488
Relevant Lines: 21174

💛 - Coveralls

This gets rid of one of the long functions mentioned in tremor-rs#20, makes the code more
readable, and (in the future) easier to test properly.

Signed-off-by: Mordecai Malignatus <mordecai@malignat.us>
@MordecaiMalignatus
Copy link
Contributor Author

Found the problem, I broke the tag selection. I'd revert back to a draft PR but that doesn't seem to be a thing. I'll dig into it this evening. I'll try to write automated tests for it and refactor to make it testable, because this is not going to be maintainable without.

@Licenser
Copy link
Member

All good, converting to a draft is well hidden :) it's op the top right under the approvers:
image

I've turned it back to a draft for you

@Licenser Licenser marked this pull request as draft October 28, 2021 08:24
@MordecaiMalignatus
Copy link
Contributor Author

MordecaiMalignatus commented Oct 28, 2021 via email

@Licenser
Copy link
Member

Heya any updats on this?

@MordecaiMalignatus
Copy link
Contributor Author

I've been working on finishing it when I could, but currently short on time. I'll try to curtail it and ship it, I have some ideas for the larger renovation/change of this bit. Sorry for the delay :)

@Licenser
Copy link
Member

All good :), no hurry just wanted to know if you're still on it or have given up ;)

@MordecaiMalignatus
Copy link
Contributor Author

I currently don't have the free time or the energy to finish this, sorry. I'll leave it as it is and, if I'm lucky, have the time to finish up the rest of this over the winter. Apologies for leaving it hanging.

@Licenser
Copy link
Member

All good no worries:) we appreciate it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants