racket / racket/htdp

Race Condition in the Test Engine When There are Multiple Files

Open
#150 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

test engine
Dominant language
Racket
Stars
112
Forks
73
Avg merge
9h 41m
Merged PRs (30d)
1

Description

When two files are running at the same time, their test results are mixed together.

Here is an example. In DrRacket, when I start A.rkt first and then run B.rkt while A is still running (or vice versa), their test results are mixed together. Depending on the launching order, the test result will even change.

A.rkt

;; The first three lines of this file were inserted by DrRacket. They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-advanced-reader.ss" "lang")((modname A) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #t #t none #f () #f)))

(check-expect "A.rkt-1" false)

(check-expect
 (begin
   (sleep 5)
   "A.rkt-2")
 false)

B.rkt

;; The first three lines of this file were inserted by DrRacket. They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-advanced-reader.ss" "lang")((modname B) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #t #t none #f () #f)))

(check-expect "B.rkt-1" "B.rkt-1")

(check-expect
 (begin
   (sleep 5)
   "B.rkt-2")
 "B.rkt-2")

Software version:

[May 10 16:44:16] $ racket -v
Welcome to Racket v8.1.0.4 [cs].
[May 10 16:44:45] $ raco pkg show htdp-lib drracket
Installation-wide:
 Package[*=auto]  Checksum              Source
 drracket*        75519974f33dd2da3...  catalog...h=drracket
 htdp-lib*        6d8926510bd48aaee...  catalog...h=htdp-lib
User-specific for installation "development":
 [none]

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the race with the provided A.rkt and B.rkt examples in DrRacket, starting both files while one is still running. The work is done when each file's test results remain separate and deterministic regardless of launch order.

Written by the indexing model from the issue text.

Assessment

Domain
testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.