From eca31f6ae33e61d524e338634e994da705940af4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yann=20C=C3=A9bron?= Date: Mon, 30 Aug 2021 15:30:07 +0200 Subject: [PATCH] testing_faq.md: format --- topics/basics/testing_plugins/testing_faq.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/topics/basics/testing_plugins/testing_faq.md b/topics/basics/testing_plugins/testing_faq.md index 971624178..3aef22cde 100644 --- a/topics/basics/testing_plugins/testing_faq.md +++ b/topics/basics/testing_plugins/testing_faq.md @@ -19,10 +19,13 @@ This page lists a number of common questions/issues and techniques useful for te ### How to avoid blinking tests? -- Always call `super.tearDown()` inside `finally {..}` block of your test class to avoid leaks and side-effects from previously run (failed) tests. -- Avoid OS-specific assumptions (e.g., filesystem case-sensitivity, hardcoded separator instead of `java.io.File.separator`). -- Use _ordered_ collections or [`UsefulTestCase.assertUnorderedCollection()`](upsource:///platform/testFramework/src/com/intellij/testFramework/UsefulTestCase.java). -- Code deferring execution (e.g., via `Application.invokeLater()`) might not run during test execution (and possibly fails in production, too). Use `invokeLater(runnable, myProject.getDisposed()`. +Always call `super.tearDown()` inside `finally {..}` block of your test class to avoid leaks and side-effects from previously run (failed) tests. + +Avoid OS-specific assumptions (e.g., filesystem case-sensitivity, hardcoded separator instead of `java.io.File.separator`). + +Use _ordered_ collections or [`UsefulTestCase.assertUnorderedCollection()`](upsource:///platform/testFramework/src/com/intellij/testFramework/UsefulTestCase.java). + +Code deferring execution (e.g., via `Application.invokeLater()`) might not run during test execution (and possibly fails in production, too). Use `invokeLater(runnable, myProject.getDisposed()`. ### How to avoid test failure when using resources?