8ff7cd865d
Blockchain occupies resources (e.g. it opens log files for DB, etc.) on creation and running. We need to release these resources if something goes wrong during execution chain-related commands. This commit solves the following problem on Windows: ``` --- FAIL: TestServerStart (0.32s) --- FAIL: TestServerStart/stateroot_service_is_on_&&_StateRootInHeader=true (0.04s) testing.go:894: TempDir RemoveAll cleanup: remove C:\Users\Anna\AppData\Local\Temp\TestServerStart_stateroot_service_is_on_&&_StateRootInHeader=true460557297\001\neogotestchain\000001.log: The process cannot access the file because it is being used by another process. --- FAIL: TestServerStart/invalid_Oracle_config (0.03s) testing.go:894: TempDir RemoveAll cleanup: remove C:\Users\Anna\AppData\Local\Temp\TestServerStart_invalid_Oracle_config810064028\001\neogotestchain\000001.log: The process cannot access the file because it is being used by another process. --- FAIL: TestServerStart/invalid_consensus_config (0.04s) testing.go:894: TempDir RemoveAll cleanup: remove C:\Users\Anna\AppData\Local\Temp\TestServerStart_invalid_consensus_config217270091\001\neogotestchain\000001.log: The process cannot access the file because it is being used by another process. --- FAIL: TestServerStart/invalid_Notary_config (0.07s) --- FAIL: TestServerStart/invalid_Notary_config/malformed_config (0.04s) testing.go:894: TempDir RemoveAll cleanup: remove C:\Users\Anna\AppData\Local\Temp\TestServerStart_invalid_Notary_config_malformed_config754934830\001\neogotestchain\000001.log: The process cannot access the file because it is being used by another process. --- FAIL: TestServerStart/invalid_Notary_config/invalid_wallet (0.03s) testing.go:894: TempDir RemoveAll cleanup: remove C:\Users\Anna\AppData\Local\Temp\TestServerStart_invalid_Notary_config_invalid_wallet934249397\001\neogotestchain\000001.log: The process cannot access the file because it is being used by another process. --- FAIL: TestServerStart/good (0.11s) testing.go:894: TempDir RemoveAll cleanup: remove C:\Users\Anna\AppData\Local\Temp\TestServerStart_good596150160\001\neogotestchain\000001.log: The process cannot access the file because it is being used by another process. ``` This commit also unifies blockchain and services releasing code. |
||
---|---|---|
.. | ||
cmdargs | ||
flags | ||
input | ||
options | ||
paramcontext | ||
query | ||
server | ||
smartcontract | ||
testdata | ||
util | ||
vm | ||
wallet | ||
.gitignore | ||
candidate_test.go | ||
contract_test.go | ||
dump_test.go | ||
executor_test.go | ||
main.go | ||
main_test.go | ||
multisig_test.go | ||
nep11_test.go | ||
nep17_test.go | ||
options_test.go | ||
query_test.go | ||
server_test.go | ||
util_test.go | ||
wallet_test.go |