google / leveldb

LevelDB is a fast key-value storage library written at Google that provides an ordered mapping from string keys to string values.
BSD 3-Clause "New" or "Revised" License
36.6k stars 7.83k forks source link

Fix EnvTest.RunMany to allow parallel execution #1106

Closed reillyeon closed 1 year ago

reillyeon commented 1 year ago

As allowed by the documentation for Env::Schedule(), ChromiumEnv may execute functions on multiple threads and guarantees no sequencing. EnvTest.RunMany assumed that functions ran in order, is the case for the stock PosixEnv and WindowsEnv implementations. This change updates the test to not assume sequential execution.