diff options
-rw-r--r-- | jsre/jsre_test.go | 2 | ||||
-rw-r--r-- | tests/init.go | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/jsre/jsre_test.go b/jsre/jsre_test.go index 8450f546c..ffb6999db 100644 --- a/jsre/jsre_test.go +++ b/jsre/jsre_test.go @@ -85,7 +85,7 @@ func TestNatto(t *testing.T) { if err != nil { t.Errorf("expected no error, got %v", err) } - time.Sleep(time.Millisecond * 10) + time.Sleep(100 * time.Millisecond) val, err := jsre.Run("msg") if err != nil { t.Errorf("expected no error, got %v", err) diff --git a/tests/init.go b/tests/init.go index 3f8b8c684..a86970499 100644 --- a/tests/init.go +++ b/tests/init.go @@ -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) |