Skip to content

test: add TestConcoredockerApi covering read/write/unchanged/initVal#490

Open
avinxshKD wants to merge 1 commit intoControlCore-Project:devfrom
avinxshKD:feat/test-concoredocker-api
Open

test: add TestConcoredockerApi covering read/write/unchanged/initVal#490
avinxshKD wants to merge 1 commit intoControlCore-Project:devfrom
avinxshKD:feat/test-concoredocker-api

Conversation

@avinxshKD
Copy link

closes #464

Added TestConcoredockerApi.java... real file I/O tests for read(), write(), unchanged(), initVal() using temp dirs.

Had to add 5 package-level setters to concoredocker.java (setInPath, setOutPath, setDelay, getSimtime, resetState) so tests can wire up without touching /in /out.

Builds on top of #468 (methods are now public).

@avinxshKD
Copy link
Author

@pradeeban TestConcoredockerApi: 20/20
image

TestLiteralEval: 50/50

image

@avinxshKD
Copy link
Author

Hey @pradeeban Pls take a look, and one thing worth noting, setDelay(0) in the test runner is necessary, otherwise each read() blocks for 1s and the suite takes around 6s for nothing. let me know if you'd prefer a different approach there.

Took a bit longer than expected since I wanted to make sure the temp dir setup was clean and didn't bleed state between tests, resetState() handles that :p

@avinxshKD
Copy link
Author

@pradeeban also Python ZMQ uses send_json/recv_json but Java sends Python literals.... True/None will break json.loads on the Python side. worth aligning? for Java I think,

just want to make sure its a ryt direction :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant