mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 18:26:01 +02:00
Fixed Bogdan's timeouts so it doesn't take months to run the test suite.
This commit is contained in:
parent
1db528a01b
commit
aa45081d82
1 changed files with 6 additions and 5 deletions
|
@ -46,6 +46,7 @@ public class IndexManagerTests extends TestCase {
|
||||||
IProject testProject;
|
IProject testProject;
|
||||||
NullProgressMonitor monitor;
|
NullProgressMonitor monitor;
|
||||||
IndexManager indexManager;
|
IndexManager indexManager;
|
||||||
|
public static final int TIMEOUT = 1500;
|
||||||
/**
|
/**
|
||||||
* Constructor for IndexManagerTest.
|
* Constructor for IndexManagerTest.
|
||||||
* @param name
|
* @param name
|
||||||
|
@ -144,7 +145,7 @@ public class IndexManagerTests extends TestCase {
|
||||||
//By doing this, we force the Index Manager to indexAll()
|
//By doing this, we force the Index Manager to indexAll()
|
||||||
indexManager = CCorePlugin.getDefault().getCoreModel().getIndexManager();
|
indexManager = CCorePlugin.getDefault().getCoreModel().getIndexManager();
|
||||||
indexManager.setEnabled(testProject,true);
|
indexManager.setEnabled(testProject,true);
|
||||||
Thread.sleep(15000);
|
Thread.sleep(1500);
|
||||||
IIndex ind = indexManager.getIndex(testProject.getFullPath(),true,true);
|
IIndex ind = indexManager.getIndex(testProject.getFullPath(),true,true);
|
||||||
char[] prefix = "typeDecl/".toCharArray();
|
char[] prefix = "typeDecl/".toCharArray();
|
||||||
IQueryResult[] qresults = ind.queryPrefix(prefix);
|
IQueryResult[] qresults = ind.queryPrefix(prefix);
|
||||||
|
@ -177,7 +178,7 @@ public class IndexManagerTests extends TestCase {
|
||||||
//By doing this, we force the Index Manager to indexAll()
|
//By doing this, we force the Index Manager to indexAll()
|
||||||
indexManager = CCorePlugin.getDefault().getCoreModel().getIndexManager();
|
indexManager = CCorePlugin.getDefault().getCoreModel().getIndexManager();
|
||||||
indexManager.setEnabled(testProject,true);
|
indexManager.setEnabled(testProject,true);
|
||||||
Thread.sleep(15000);
|
Thread.sleep(TIMEOUT);
|
||||||
//Make sure project got added to index
|
//Make sure project got added to index
|
||||||
IPath testProjectPath = testProject.getFullPath();
|
IPath testProjectPath = testProject.getFullPath();
|
||||||
IIndex ind = indexManager.getIndex(testProjectPath,true,true);
|
IIndex ind = indexManager.getIndex(testProjectPath,true,true);
|
||||||
|
@ -206,7 +207,7 @@ public class IndexManagerTests extends TestCase {
|
||||||
//By doing this, we force the Index Manager to indexAll()
|
//By doing this, we force the Index Manager to indexAll()
|
||||||
indexManager = CCorePlugin.getDefault().getCoreModel().getIndexManager();
|
indexManager = CCorePlugin.getDefault().getCoreModel().getIndexManager();
|
||||||
indexManager.setEnabled(testProject,true);
|
indexManager.setEnabled(testProject,true);
|
||||||
Thread.sleep(15000);
|
Thread.sleep(TIMEOUT);
|
||||||
//Make sure project got added to index
|
//Make sure project got added to index
|
||||||
IPath testProjectPath = testProject.getFullPath();
|
IPath testProjectPath = testProject.getFullPath();
|
||||||
IIndex ind = indexManager.getIndex(testProjectPath,true,true);
|
IIndex ind = indexManager.getIndex(testProjectPath,true,true);
|
||||||
|
@ -225,7 +226,7 @@ public class IndexManagerTests extends TestCase {
|
||||||
//By doing this, we force the Index Manager to indexAll()
|
//By doing this, we force the Index Manager to indexAll()
|
||||||
indexManager = CCorePlugin.getDefault().getCoreModel().getIndexManager();
|
indexManager = CCorePlugin.getDefault().getCoreModel().getIndexManager();
|
||||||
indexManager.setEnabled(testProject,true);
|
indexManager.setEnabled(testProject,true);
|
||||||
Thread.sleep(15000);
|
Thread.sleep(TIMEOUT);
|
||||||
//Make sure project got added to index
|
//Make sure project got added to index
|
||||||
IPath testProjectPath = testProject.getFullPath();
|
IPath testProjectPath = testProject.getFullPath();
|
||||||
IIndex ind = indexManager.getIndex(testProjectPath,true,true);
|
IIndex ind = indexManager.getIndex(testProjectPath,true,true);
|
||||||
|
@ -269,7 +270,7 @@ public class IndexManagerTests extends TestCase {
|
||||||
//By doing this, we force the Index Manager to indexAll()
|
//By doing this, we force the Index Manager to indexAll()
|
||||||
indexManager = CCorePlugin.getDefault().getCoreModel().getIndexManager();
|
indexManager = CCorePlugin.getDefault().getCoreModel().getIndexManager();
|
||||||
indexManager.setEnabled(testProject,true);
|
indexManager.setEnabled(testProject,true);
|
||||||
Thread.sleep(15000);
|
Thread.sleep(TIMEOUT);
|
||||||
//Make sure project got added to index
|
//Make sure project got added to index
|
||||||
IPath testProjectPath = testProject.getFullPath();
|
IPath testProjectPath = testProject.getFullPath();
|
||||||
IIndex ind = indexManager.getIndex(testProjectPath,true,true);
|
IIndex ind = indexManager.getIndex(testProjectPath,true,true);
|
||||||
|
|
Loading…
Add table
Reference in a new issue