-
Notifications
You must be signed in to change notification settings - Fork 202
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
Conversation
TaskExecutorReport.available())).get()); | ||
assertEquals(TASK_EXECUTOR_ID, resourceCluster.getTaskExecutorFor(MACHINE_DEFINITION, WORKER_ID).get()); | ||
assertEquals(ImmutableList.of(), resourceCluster.getAvailableTaskExecutors().get()); | ||
Thread.sleep(2000); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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.
98c24d9
to
5f7de0d
Compare
c88f852
to
6e1c241
Compare
cleaning the code Making tests run in serial Adding failure message Adding failure message Fixing flaky tests
793495b
to
68bf289
Compare
Context
This change purely has some additional tests for the resource cluster actor.
Checklist
./gradlew build
compiles code correctly./gradlew test
passes all testsCONTRIBUTING.md