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

Status

Assignee

Alexander Redington

Reporter

Alexander Redington

Labels

Approval

Ok

Patch

Code

Fix versions

Affects versions

Priority

Critical
Configure