good morning!!!!

Skip to content
Snippets Groups Projects
Commit 9dc5de51 authored by Péter Szilágyi's avatar Péter Szilágyi
Browse files

tests: fix data race in bad-block-report disabling during tests

parent e3f36d97
No related branches found
No related tags found
No related merge requests found
......@@ -56,13 +56,16 @@ var (
VmSkipTests = []string{}
)
// Disable reporting bad blocks for the tests
func init() {
core.DisableBadBlockReporting = true
}
func readJson(reader io.Reader, value interface{}) error {
data, err := ioutil.ReadAll(reader)
if err != nil {
return fmt.Errorf("Error reading JSON file", err.Error())
}
core.DisableBadBlockReporting = true
if err = json.Unmarshal(data, &value); err != nil {
if syntaxerr, ok := err.(*json.SyntaxError); ok {
line := findLine(data, syntaxerr.Offset)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment