mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-30 18:27:49 +08:00
testing_faq.md: indexing changes in 242
This commit is contained in:
parent
6c67124f0d
commit
cdbedc05cc
@ -16,7 +16,10 @@ Dumb-aware intentions and quick-fixes
|
||||
: Mark implementations as enabled during indexing, see [](indexing_and_psi_stubs.md#DumbAwareAPI).
|
||||
|
||||
Testing: `ProjectActivity`
|
||||
: Executed asynchronously now during tests, see FAQ entry [](testing_faq.md#how-to-handle-projectactivity).
|
||||
: Executed asynchronously now during tests, see [](testing_faq.md#how-to-handle-projectactivity).
|
||||
|
||||
Testing: indexes
|
||||
: Indexes are now built asynchronously during tests, see [](testing_faq.md#how-to-handle-indexing).
|
||||
|
||||
## 2024.1
|
||||
|
||||
|
@ -17,6 +17,7 @@ This page lists a number of common questions/issues and techniques useful for te
|
||||
- [`PsiTestUtil`](%gh-ic%/platform/testFramework/src/com/intellij/testFramework/PsiTestUtil.java)
|
||||
- [`VfsTestUtil`](%gh-ic%/platform/testFramework/src/com/intellij/testFramework/VfsTestUtil.java)
|
||||
- [`IoTestUtil`](%gh-ic%/platform/testFramework/src/com/intellij/openapi/util/io/IoTestUtil.java)
|
||||
- [`IndexingTestUtil`](%gh-ic%/platform/testFramework/src/com/intellij/testFramework/IndexingTestUtil.kt)
|
||||
- [`LeakHunter`](%gh-ic%/platform/testFramework/common/src/LeakHunter.java)
|
||||
|
||||
### UI
|
||||
@ -229,4 +230,11 @@ PsiTestUtil.addLibrary(model,
|
||||
If tests depend on some job done in `ProjectActivity` (e.g., automatic project re-import), implement a dedicated [event/listener](messaging_infrastructure.md) and wait for it explicitly.
|
||||
As a workaround, use [`StartupActivityTestUtil.waitForProjectActivitiesToComplete()`](%gh-ic-master%/platform/testFramework/src/com/intellij/testFramework/StartupActivityTestUtil.kt).
|
||||
|
||||
### How to handle indexing?
|
||||
<primary-label ref="2024.2"/>
|
||||
|
||||
Indexing is now run asynchronously in a background thread.
|
||||
Use [`IndexingTestUtil.waitUntilIndexesAreReady()/suspendUntilIndexesAreReady()`](%gh-ic%/platform/testFramework/src/com/intellij/testFramework/IndexingTestUtil.kt)
|
||||
to wait for fully populated indexes.
|
||||
|
||||
<include from="snippets.md" element-id="missingContent"/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user