-
Notifications
You must be signed in to change notification settings - Fork 302
Closed
Labels
Description
This test hangs, pegging CPU at 100% and growing memory usage to over 10 GB, but only when run with the test command in UCM:
test> data.Array.Raw.map.tests.props = test.verify do
use Nat * + < ==
use Raw fromList map toList
use data.Array.Raw read size
labeled "identity mapping" do
n = natIn 0 50
xs = listOf nat do n
arr = fromList xs
result = map id arr
ensure (size result == size arr)
go i =
if i < size arr then
ensureEqual (read result i) (read arr i)
go (i + 1)
else ()
go 0
Note that it completes normally when run as a watch expression, or via the run command.
This version completes normally even under test:
test> data.Array.Raw.map.tests.props = test.verify do
use Nat * + < ==
use Raw fromList map toList
use data.Array.Raw read size
labeled "identity mapping" do
n = natIn 0 50
xs = listOf nat do n
arr = fromList xs
result = map id arr
ensure (size result == size arr)
ensureEqual (toList result) (toList arr)
To reproduce:
- Clone the
@runarorama/rationalbranch from@unison/base. debug.clear-cachetest data.Array.Raw.map.tests
Reactions are currently unavailable