fixture-monkey icon indicating copy to clipboard operation
fixture-monkey copied to clipboard

BigDemical에 대한 값 생성 오류

Open sunwon12 opened this issue 1 year ago • 1 comments

Describe the bug

Describe your issue here. 오류: image

설정: image image image

보시다시피 fixtureMonkey에 대한 특별한 설정을 주지 않았습니다. 그런데 BigDemical이 값을 잘못 생성할 때도 있습니다.

Your environment

  • version of Fixture Monkey
  • version of Java/Kotlin

Steps to reproduce

Tell us how to reproduce this issue. Or provide us an example repository to check the bug It would be very helpful if you could tell us the seed of the given test, which is provided in fixture-monkey-junit-jupiter module

Expected behaviour

Tell us what should happen

Actual behaviour

Tell us what happens instead

sunwon12 avatar Sep 03 '24 18:09 sunwon12

@sunwon12 안녕하세요.

주신 에러메세지를 봤을 때는 BigDecimal 생성에 문제가 있는 게 아니라 데이터베이스에서 정해놓은 크기보다 더 큰 값이 생성되고 있어 문제가 되고 있는 것으로 보입니다.

아래와 같이 SimplevalueJqwikPlugin()을 추가하시는 걸 권장드립니다.

  FixtureMonkey.builder()
      .plugin(new SimpleValueJqwikPlugin())
      .build()

혹은 다음 옵션을 사용해서 BigDecimal 생성 범위를 제한하시는 방법도 있습니다. 참조 문서

감사합니다.

seongahjo avatar Sep 04 '24 06:09 seongahjo