From 79e5e42e5040602fd368f08405b11c4c8637b917 Mon Sep 17 00:00:00 2001 From: Ihor Radchenko Date: Sun, 1 Jan 2023 15:53:20 +0300 Subject: [PATCH] test-ob-octave.el: Remove test clauses causing race condition * testing/lisp/test-ob-octave.el (ob-octave/graphics-file): (ob-octave/graphics-file-session): (ob-octave/graphics-file-space): Do not check the created image file size. This tests causes race condition between the test and Octave writing image to disk. Also, the correctness of image file is nothing of Org's business as long as ob-ocatave's Elisp implementation is concerned. --- testing/lisp/test-ob-octave.el | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/testing/lisp/test-ob-octave.el b/testing/lisp/test-ob-octave.el index 8b68150fb..4e9fea97b 100644 --- a/testing/lisp/test-ob-octave.el +++ b/testing/lisp/test-ob-octave.el @@ -79,12 +79,6 @@ sombrero; (org-babel-execute-src-block) (should (search-forward (format "[[file:%s]]" file) nil nil)) (should (file-readable-p file)) - (should (or (> (file-attribute-size (file-attributes file)) 0) - ;; Avoid race condition on slow machines. - ;; https://orgmode.org/list/87r0wk29dz.fsf@localhost - (progn - (sleep-for 1) - (> (file-attribute-size (file-attributes file)) 0)))) (should-not (get-buffer "*Org-Babel Error Output*"))) ;; clean-up (delete-file file) @@ -105,12 +99,6 @@ sombrero; (should (get-buffer "*Inferior Octave*")) (should (search-forward (format "[[file:%s]]" file) nil nil)) (should (file-readable-p file)) - (or (> (file-attribute-size (file-attributes file)) 0) - ;; Avoid race condition on slow machines. - ;; https://orgmode.org/list/87r0wk29dz.fsf@localhost - (progn - (sleep-for 1) - (> (file-attribute-size (file-attributes file)) 0))) (should-not (get-buffer "*Org-Babel Error Output*"))) ;; clean-up (delete-file file) @@ -131,12 +119,6 @@ sombrero; (org-babel-execute-src-block) (should (search-forward (format "[[file:%s]]" file) nil nil)) (should (file-readable-p file)) - (or (> (file-attribute-size (file-attributes file)) 0) - ;; Avoid race condition on slow machines. - ;; https://orgmode.org/list/87r0wk29dz.fsf@localhost - (progn - (sleep-for 1) - (> (file-attribute-size (file-attributes file)) 0))) (should-not (get-buffer "*Org-Babel Error Output*"))) ;; clean-up (delete-file file)