mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-15 04:55:22 +02:00
[194667] fixed logic bug in RSEPersistenceManager
This commit is contained in:
parent
d5efb2aa59
commit
9b746334ea
2 changed files with 16 additions and 1 deletions
|
@ -244,7 +244,9 @@ public class RSEPersistenceManager implements IRSEPersistenceManager {
|
||||||
for (int i = 0; i < ids.length && isComplete; i++) {
|
for (int i = 0; i < ids.length && isComplete; i++) {
|
||||||
String id = ids[i];
|
String id = ids[i];
|
||||||
ProviderRecord pr = getProviderRecord(id);
|
ProviderRecord pr = getProviderRecord(id);
|
||||||
isComplete = pr.isAutostart() && pr.isRestored();
|
if (pr.isAutostart()) {
|
||||||
|
isComplete = isComplete && pr.isRestored();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return isComplete;
|
return isComplete;
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,6 +50,19 @@ public class PersistenceTest extends RSECoreTestCase {
|
||||||
super.tearDown();
|
super.tearDown();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void testPersistenceManagerStartup() {
|
||||||
|
IRSEPersistenceManager m = RSECorePlugin.getThePersistenceManager();
|
||||||
|
for (int i = 0; i < 5; i++) {
|
||||||
|
if (m.isRestoreComplete()) break;
|
||||||
|
try {
|
||||||
|
Thread.sleep(1000);
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
assertTrue("Restore not complete", m.isRestoreComplete());
|
||||||
|
}
|
||||||
|
|
||||||
public void testProfilePersistence() {
|
public void testProfilePersistence() {
|
||||||
/*
|
/*
|
||||||
* Set up this particular test.
|
* Set up this particular test.
|
||||||
|
|
Loading…
Add table
Reference in a new issue