mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
cleanup
This commit is contained in:
+2
-2
@@ -49,8 +49,8 @@ public abstract class LightCompletionTestCase extends LightCodeInsightTestCase {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configureByFile(@NotNull String filePath) {
|
||||
super.configureByFile(filePath);
|
||||
protected void configureByFile(@NotNull String relativePath) {
|
||||
super.configureByFile(relativePath);
|
||||
|
||||
complete();
|
||||
}
|
||||
|
||||
+4
-5
@@ -248,7 +248,7 @@ public class BackgroundTaskQueueTest extends PlatformTestCase {
|
||||
};
|
||||
|
||||
final AtomicInteger cntThreads = new AtomicInteger(THREADS);
|
||||
myThreadRunner.run(THREADS, i -> {
|
||||
myThreadRunner.run(THREADS, __ -> {
|
||||
for (int j = 0; j < RUNS_PER_THREAD; j++) {
|
||||
sleepX(7);
|
||||
myQueue.run(task);
|
||||
@@ -260,7 +260,6 @@ public class BackgroundTaskQueueTest extends PlatformTestCase {
|
||||
|
||||
Assert.assertTrue(myQueue.isEmpty());
|
||||
Assert.assertEquals(0, cntThreads.get());
|
||||
myThreadRunner.finish();
|
||||
}
|
||||
|
||||
private static void assertSucceeded(TestTask task) {
|
||||
@@ -283,7 +282,7 @@ public class BackgroundTaskQueueTest extends PlatformTestCase {
|
||||
|
||||
private static void waitForTasks(TestTask... tasks) throws InterruptedException {
|
||||
for (TestTask task : tasks) {
|
||||
task.waitFor(1_000);
|
||||
task.waitFor(1, TimeUnit.SECONDS);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -357,8 +356,8 @@ public class BackgroundTaskQueueTest extends PlatformTestCase {
|
||||
assertNotSame(TaskState.CREATED, myState.get());
|
||||
}
|
||||
|
||||
public void waitFor(int timeout) throws InterruptedException {
|
||||
assertTrue(mySemaphore.tryAcquire(1, timeout, TimeUnit.MILLISECONDS));
|
||||
public void waitFor(int timeout, TimeUnit timeUnit) throws InterruptedException {
|
||||
assertTrue(mySemaphore.tryAcquire(1, timeout, timeUnit));
|
||||
mySemaphore.release();
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -97,11 +97,11 @@ public abstract class LightPlatformCodeInsightTestCase extends LightPlatformTest
|
||||
* Configure test from data file. Data file is usual java, xml or whatever file that needs to be tested except it
|
||||
* has <caret> marker where caret should be placed when file is loaded in editor and <selection></selection>
|
||||
* denoting selection bounds.
|
||||
* @param filePath - relative path from %IDEA_INSTALLATION_HOME%/testData/
|
||||
* @param relativePath - relative path from %IDEA_INSTALLATION_HOME%/testData/
|
||||
*/
|
||||
protected void configureByFile(@TestDataFile @NonNls @NotNull String filePath) {
|
||||
protected void configureByFile(@TestDataFile @NonNls @NotNull String relativePath) {
|
||||
try {
|
||||
String fullPath = getTestDataPath() + filePath;
|
||||
String fullPath = getTestDataPath() + relativePath;
|
||||
final File ioFile = new File(fullPath);
|
||||
checkCaseSensitiveFS(fullPath, ioFile);
|
||||
String fileText = FileUtilRt.loadFile(ioFile, CharsetToolkit.UTF8, true);
|
||||
|
||||
@@ -24,8 +24,8 @@ public class AntCompletionTest extends LightCodeInsightTestCase {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configureByFile(@NotNull @TestDataFile @NonNls String filePath) {
|
||||
super.configureByFile(filePath);
|
||||
protected void configureByFile(@NotNull @TestDataFile @NonNls String relativePath) {
|
||||
super.configureByFile(relativePath);
|
||||
AntSupport.markFileAsAntFile(myVFile, myFile.getProject(), true);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user