From 43dfc73c4c7cc1075739f341fbb56044e65ee0ee Mon Sep 17 00:00:00 2001 From: Zhihan Li <54661071+zhihali@users.noreply.github.com> Date: Thu, 11 Jul 2024 17:34:59 +0100 Subject: [PATCH] add sync and async test guide at contributing.md (#2694) --- CONTRIBUTING.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d7fc509c3..8ab75ce1c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -269,6 +269,9 @@ Below is a checklist of things to be mindful of when implementing a new instrume - ex. - Appropriate error handling - ex. +- Isolate sync and async test + - For synchronous tests, the typical test case class is inherited from `opentelemetry.test.test_base.TestBase`. However, if you want to write asynchronous tests, the test case class should inherit also from `IsolatedAsyncioTestCase`. Adding asynchronous tests to a common test class can lead to tests passing without actually running, which can be misleading. + - ex. ## Expectations from contributors