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

Andy Fingerhut made changes -
Field Original Value New Value
Attachment clj-1328-v1.diff [ 12710 ]
Andy Fingerhut made changes -
Patch Code and Test [ 10002 ]
Andy Fingerhut made changes -
Description 3 deftest's in multimethods.clj 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.
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.
Summary Some multimethods tests pass/fail changes depending upon order deftest's are executed Make some Clojure tests independent of hash function used
Andy Fingerhut made changes -
Attachment clj-1328-v2.diff [ 12728 ]
Andy Fingerhut made changes -
Attachment clj-1328-v1.diff [ 12710 ]
Andy Fingerhut made changes -
Attachment clj-1328-v3.diff [ 12729 ]
Andy Fingerhut made changes -
Attachment clj-1328-v2.diff [ 12728 ]
Alex Miller made changes -
Approval Vetted [ 10003 ]
Fix Version/s Release 1.6 [ 10157 ]
Andy Fingerhut made changes -
Attachment clj-1328-v4.diff [ 12738 ]
Stuart Halloway made changes -
Approval Vetted [ 10003 ] Screened [ 10004 ]
Rich Hickey made changes -
Approval Screened [ 10004 ] Ok [ 10007 ]
Stuart Halloway made changes -
Resolution Completed [ 1 ]
Status Open [ 1 ] Closed [ 6 ]

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: