Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -601,13 +601,16 @@ private void testBinaryContentTypeWithDescriber(TestResultCollector collector) t
.forEach(extension -> registry.removeExtension(extension, masterToken));
}) {

IFolder folder= ResourceHelper.createFolder(fProject.getFolder("folder1"));
// Use unique folder name to avoid conflicts with other tests running in parallel
String uniqueFolderName= "binaryContentTypeTest-" + java.util.UUID.randomUUID().toString();
IFolder folder= ResourceHelper.createFolder(fProject.getFolder(uniqueFolderName));
IFile textfile= ResourceHelper.createFile(folder, "textfile", "text hello");
IFile binaryfile= ResourceHelper.createFile(folder, "binaryfile", "binary hello");

Pattern searchPattern= PatternConstructor.createPattern("hello", true, false);

FileTextSearchScope scope= FileTextSearchScope.newSearchScope(new IResource[] { fProject }, (String[]) null, false);
// Search only in the unique folder to avoid interference from other tests
FileTextSearchScope scope= FileTextSearchScope.newSearchScope(new IResource[] { folder }, (String[]) null, false);
TextSearchEngine.create().search(scope, collector, searchPattern, null);

TestResult[] results= collector.getResults();
Expand Down
Loading