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

Add compute capacity unit tests #2820

Merged
merged 2 commits into from
Jun 12, 2024

Conversation

zaelgohary
Copy link
Contributor

@zaelgohary zaelgohary commented May 30, 2024

Description

Add compute capacity unit tests

Related Issues

Checklist

  • Tests included
  • Build pass
  • Documentation
  • Code format and docstrings
  • Screenshots/Video attached (needed for UI changes)

Copy link
Contributor

@xmonader xmonader left a comment

Choose a reason for hiding this comment

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

Really good progress

I shouldn't be able to construct a class in invalid state, so what I suggest is we maybe introduce a constructor that enforces our invariants.

That being said, I should be expecting the following
1- valid state scenarios to construct e.g a for loop to create computecapacity with numbers (or use a library to generate these)
2- checks for invariants e.g in negative, zeros, decimals, non-ints, boundary values, overflow values, and special numbers like min/max for ram and cpu and ensuring you can't initialize less or higher than them

@zaelgohary zaelgohary marked this pull request as draft June 4, 2024 11:34
@zaelgohary zaelgohary marked this pull request as ready for review June 4, 2024 11:51
Copy link
Contributor

@Mahmoud-Emad Mahmoud-Emad left a comment

Choose a reason for hiding this comment

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

The code looks good to me. However, when I tried to run all of the tests, including yours, nothing happened, and my laptop crashed. Please have someone else run the tests instead of me.

@AhmedHanafy725 AhmedHanafy725 marked this pull request as draft June 5, 2024 08:19
@zaelgohary zaelgohary marked this pull request as ready for review June 9, 2024 11:20
@zaelgohary
Copy link
Contributor Author

The code looks good to me. However, when I tried to run all of the tests, including yours, nothing happened, and my laptop crashed. Please have someone else run the tests instead of me.

Does this happen every time you run these tests?

@zaelgohary zaelgohary requested a review from Mahmoud-Emad June 9, 2024 11:21
Copy link
Contributor

@amiraabouhadid amiraabouhadid left a comment

Choose a reason for hiding this comment

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

fails
image
image

@zaelgohary
Copy link
Contributor Author

zaelgohary commented Jun 10, 2024

fails image image

Because the validation doesn't work in all workloads. There's an issue opened for it. The tests are implemented correctly though.

@zaelgohary zaelgohary merged commit 8a6d2d0 into development Jun 12, 2024
2 checks passed
@zaelgohary zaelgohary deleted the development_test_compute_capacity branch June 12, 2024 08:36
@xmonader xmonader added this to the 2.6.0 milestone Sep 24, 2024
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.

4 participants