This commit is contained in:
Alexey Kudravtsev
2019-04-18 14:41:57 +03:00
parent 5f427ec585
commit 3633415d46
4 changed files with 11 additions and 12 deletions
@@ -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();
}
@@ -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();
}
@@ -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 &lt;caret&gt; marker where caret should be placed when file is loaded in editor and &lt;selection&gt;&lt;/selection&gt;
* 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);
}