Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Race Condition in the Test Engine When There are Multiple Files #150

Open
shhyou opened this issue May 10, 2021 · 0 comments
Open

Race Condition in the Test Engine When There are Multiple Files #150

shhyou opened this issue May 10, 2021 · 0 comments
Labels
test engine topics related to the test engine

Comments

@shhyou
Copy link
Collaborator

shhyou commented May 10, 2021

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]
@shhyou shhyou added the test engine topics related to the test engine label May 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test engine topics related to the test engine
Projects
None yet
Development

No branches or pull requests

1 participant