1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-07 17:56:01 +02:00

Use the default indexer timeout instead of hard-coded ones in some tests

Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
This commit is contained in:
Marc-Andre Laperle 2014-03-18 01:00:33 -04:00
parent 535ad23797
commit ac235ca6b7
2 changed files with 4 additions and 4 deletions

View file

@ -122,7 +122,7 @@ public class IndexIncludeTest extends IndexTestBase {
} }
}, npm()); }, npm());
assertTrue("Timestamp was not increased", file.getLocalTimeStamp() >= timestamp); assertTrue("Timestamp was not increased", file.getLocalTimeStamp() >= timestamp);
TestSourceReader.waitUntilFileIsIndexed(fIndex, file, 4000); waitUntilFileIsIndexed(fIndex, file);
fIndex.acquireReadLock(); fIndex.acquireReadLock();
try { try {
IIndexFile ifile= getIndexFile(file); IIndexFile ifile= getIndexFile(file);
@ -155,7 +155,7 @@ public class IndexIncludeTest extends IndexTestBase {
TestSourceReader.createFile(fProject.getProject(), "user20061107.h", ""); TestSourceReader.createFile(fProject.getProject(), "user20061107.h", "");
TestSourceReader.createFile(fProject.getProject(), "system20061107.h", ""); TestSourceReader.createFile(fProject.getProject(), "system20061107.h", "");
IFile file= TestSourceReader.createFile(fProject.getProject(), "source20061107.cpp", content); IFile file= TestSourceReader.createFile(fProject.getProject(), "source20061107.cpp", content);
TestSourceReader.waitUntilFileIsIndexed(fIndex, file, 4000); waitUntilFileIsIndexed(fIndex, file);
fIndex.acquireReadLock(); fIndex.acquireReadLock();
try { try {

View file

@ -165,7 +165,7 @@ public class IndexLocationTest extends BaseTestCase {
CCorePlugin.getIndexManager().reindex(cproject); CCorePlugin.getIndexManager().reindex(cproject);
IIndex index = CCorePlugin.getIndexManager().getIndex(cproject); IIndex index = CCorePlugin.getIndexManager().getIndex(cproject);
TestSourceReader.waitUntilFileIsIndexed(index, content.getFile("external2.h"), 4000); waitUntilFileIsIndexed(index, content.getFile("external2.h"));
index.acquireReadLock(); index.acquireReadLock();
try { try {
IBinding[] bs= index.findBindings("External".toCharArray(), IndexFilter.ALL, npm()); IBinding[] bs= index.findBindings("External".toCharArray(), IndexFilter.ALL, npm());
@ -198,7 +198,7 @@ public class IndexLocationTest extends BaseTestCase {
IIndex index = CCorePlugin.getIndexManager().getIndex(cproject); IIndex index = CCorePlugin.getIndexManager().getIndex(cproject);
CCorePlugin.getIndexManager().reindex(cproject); CCorePlugin.getIndexManager().reindex(cproject);
TestSourceReader.waitUntilFileIsIndexed(index, file, 10000); waitUntilFileIsIndexed(index, file);
waitForIndexer(cproject); waitForIndexer(cproject);
index.acquireReadLock(); index.acquireReadLock();
try { try {