Intermittent failure of ImageWorkerTest.rescaleToBytesNoData

Description

Seen on Jenkins CI (ares) and locally in Maven and Eclipse. Can be reproduced running just this method in Eclipse:

Environment

None

Activity

Show:
Ben Caradoc-Davies
July 30, 2017, 10:42 PM
Edited

The random test image sometimes had maximum byte values of 254 not 255 because of random number generation combined with rounding during rescaling. The fix is to change the test to check that min and max are not 1 and 255 respectively, but in the range [1, 255], which is what the original comment above the test actually says!

Fixed on master and 17.x.

Fixed

Assignee

Ben Caradoc-Davies

Reporter

Ben Caradoc-Davies

Triage

Components

Fix versions

Affects versions

Priority

Medium