clojure.test/inc-report-counter is not thread safe

Description

clojure.test/inc-report-counter function combines dereferencing the report-counters ref and operating on the previous state of the ref, leading to race conditions during concurrent use.

Approach: Rewrite update function to be entirely in terms of the old state:

Patch: fix-CLJ-1528.diff
Screened by: Alex Miller

Environment

OS X, Clojure 1.7, Macbook pro

Attachments

1

Activity

Show:

Alexander Redington September 19, 2014 at 4:58 PM

Fixes 1528

Completed

Details

Assignee

Reporter

Labels

Approval

Patch

Priority

Affects versions

Fix versions

Created September 19, 2014 at 4:55 PM
Updated July 18, 2015 at 12:55 AM
Resolved July 18, 2015 at 12:55 AM