[Koha-bugs] [Bug 14256] tests for TestBuilder randomly fails

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Jun 2 21:13:49 CEST 2015


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14256

Tomás Cohen Arazi <tomascohen at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #39463|0                           |1
        is obsolete|                            |

--- Comment #10 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
Created attachment 39788
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=39788&action=edit
Bug 14256: Make TestBuilder regenerates a string if to short

In some cases, especially branchcode and categorycode, the generated
string for a primary key already existed in DB.
Which make the tests fail, and the data are not gererated.

This patch regenerate a string if the one generated is too short and can
be longer.

Test plan:
Use the diff from the previous comment, and confirm that the tests only
fail in the very few cases.

QA: Actually I don't know if the better could be to use the existing
value, but maybe not...

Signed-off-by: Mark Tompsett <mtompset at hotmail.com>

NOTE: Perhaps a hardcoded size like >=2 could be replaced by
      the minimum of (+1 max string length in the field, size cap).
      After a couple glitches testing, my bad, it does reduce
      failures drastically. I had category code of length 4 in my
      database at the time.
Signed-off-by: Tomas Cohen Arazi <tomascohen at gmail.com>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list