Four TestConstraintBasedAlgorithm tests pass when nothing is thrown

Open Beginner friendly
#3,210 0 comments 0 reactions 0 assignees View on GitHub

@sharanggupta is already working on this.

Since Nov 12, 2026.

  • #3211 by @sharanggupta — open

Assessment

Difficulty
1/5
Estimated time
1-3 hours
Newbie friendliness
85/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
java
Domain
testing

Research direction

In helix-core, inspect the four named TestConstraintBasedAlgorithm tests and their exception assertions. Add a failure assertion after each calculate call, then run those tests to confirm they still pass because the expected exception is thrown.

Written by the indexing model from the issue text.

Description

testCalculateNoValidAssignment, testCalculateNoValidAssignmentFirstAndThenRecovery, testSortingEarlyQuitLackCapacity and testCalculateWithInvalidAssignmentForNodeCapacity in helix-core call algorithm.calculate(clusterModel) in a try and assert only inside catch (HelixRebalanceException ex). There is no Assert.fail() after the call, so they pass when calculate returns normally.

I have a branch that adds the Assert.fail(). All four still pass, so the exception is thrown today.

Dominant language
Java
Stars
505
Forks
258
Avg merge
4d 20h
Merged PRs (30d)
3

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/helix

All issues in apache/helix

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.