Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Allow to disable value range check on ConstraintVerifier for Unit Test

Aperta
#2,237 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
45/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
java
Ambito
testing

Direzione di ricerca

Start by locating ConstraintVerifier and the assertValueRangeForBasicVariables check, then review related tests and issue #2143 for the intended opt-out behavior. Add a way for unit tests to disable the range validation without reconstructing the full value range, and verify both enabled and disabled behavior in ConstraintVerifier tests.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

process/needs triage

There was a change around ~v1.30 which added a assertValueRangeForBasicVariables check that throws if the assigned variable is not within the specified values provided by @ValueRangeProvider.

When I use the ConstraintVerifier to unit test a constraint, it can be cumbersome to recreate the full range of possible values.

Basically when you unit test a constraint, you are giving a solution and expecting some weight/scoring for this constraint. The assertValueRange check forces you to recreate a full fledged solution including the possible values, which may add noise and may not be relevant to the unit test. It adds complexity to the test.

The bypass I have is to pin the variable and customize the @ValueRangeProvider to return the pinned variable when pinned = true. It is not ideal. Related issue: #2143

Lingua principale
Java
Stelle
1.8k
Fork
239
Merge medio
3g 2h
PR unite (30g)
51

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di TimefoldAI/timefold-solver

Tutte le issue di TimefoldAI/timefold-solver

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.