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

Adding tests for Resource Cluster Actor #169

Merged
merged 1 commit into from
Apr 14, 2022

Conversation

sundargates
Copy link
Collaborator

Context

This change purely has some additional tests for the resource cluster actor.

Checklist

  • ./gradlew build compiles code correctly
  • Added new tests where applicable
  • ./gradlew test passes all tests
  • Extended README or added javadocs where applicable
  • Added copyright headers for new files from CONTRIBUTING.md

TaskExecutorReport.available())).get());
assertEquals(TASK_EXECUTOR_ID, resourceCluster.getTaskExecutorFor(MACHINE_DEFINITION, WORKER_ID).get());
assertEquals(ImmutableList.of(), resourceCluster.getAvailableTaskExecutors().get());
Thread.sleep(2000);
Copy link
Collaborator

Choose a reason for hiding this comment

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

should this be done using a mock Clock?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm not sure if I can make Akka schedule something (such as the assignment timeout in this case) based on a mock clock. Let me take a look into this.

Copy link
Contributor

Choose a reason for hiding this comment

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

It would be great if we could. All these Thread.sleep() start to add up over time.

TaskExecutorReport.available())).get());
assertEquals(TASK_EXECUTOR_ID, resourceCluster.getTaskExecutorFor(MACHINE_DEFINITION, WORKER_ID).get());
assertEquals(ImmutableList.of(), resourceCluster.getAvailableTaskExecutors().get());
Thread.sleep(2000);
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be great if we could. All these Thread.sleep() start to add up over time.

@github-actions
Copy link

github-actions bot commented Apr 13, 2022

Unit Test Results

108 files  +33  108 suites  +33   5m 20s ⏱️ + 3m 4s
475 tests +89  456 ✔️ +88  19 💤 +2  0  - 1 

Results for commit 68bf289. ± Comparison against base commit b0f9e60.

♻️ This comment has been updated with latest results.

cleaning the code

Making tests run in serial

Adding failure message

Adding failure message

Fixing flaky tests
@sundargates sundargates merged commit 46d219a into Netflix:master Apr 14, 2022
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.

3 participants