Clojure

Make some Clojure tests independent of hash function used

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Completed
  • Affects Version/s: Release 1.6
  • Fix Version/s: Release 1.6
  • Component/s: None
  • Labels:
    None
  • Patch:
    Code and Test
  • Approval:
    Ok

Description

The most interesting failures with the new hash function are probably the 3 deftest's in multimethods.clj that define the same multimethod name 'simple', and thus whether they pass or fail depends upon the order that they are executed. They are currently executed in an order that allows them to pass. Found this while testing murmurHash3 changes to Clojure, which caused the deftest's to execute in a different order and fail.

Simplest way to eliminate this dependency on order is to make the multimethod names unique in each test, so none of them depends upon state left behind by the others.

  1. clj-1328-v3.diff
    29/Jan/14 10:52 PM
    6 kB
    Andy Fingerhut
  2. clj-1328-v4.diff
    31/Jan/14 3:43 PM
    6 kB
    Andy Fingerhut

Activity

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: