Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/MetadataRepositoryManagerTest.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/MetadataRepositoryManagerTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/MetadataRepositoryManagerTest.java
index f8cfb4b48..801fd40d9 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/MetadataRepositoryManagerTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/metadata/repository/MetadataRepositoryManagerTest.java
@@ -104,14 +104,21 @@ public class MetadataRepositoryManagerTest extends AbstractProvisioningTest {
assertEquals("4.0", disabledCount + 1, newDisabledCount);
assertEquals("4.1", allCount - 1, newAllCount);
+ //re-loading the repository should not change anything
+ manager.loadRepository(testRepo.getLocation(), null);
+ newDisabledCount = manager.getKnownRepositories(IMetadataRepositoryManager.REPOSITORIES_DISABLED).length;
+ newAllCount = manager.getKnownRepositories(IMetadataRepositoryManager.REPOSITORIES_ALL).length;
+ assertEquals("5.0", disabledCount + 1, newDisabledCount);
+ assertEquals("5.1", allCount - 1, newAllCount);
+
//re-enable the repository
manager.setEnabled(testRepo.getLocation(), true);
//should be back to the original counts
newDisabledCount = manager.getKnownRepositories(IMetadataRepositoryManager.REPOSITORIES_DISABLED).length;
newAllCount = manager.getKnownRepositories(IMetadataRepositoryManager.REPOSITORIES_ALL).length;
- assertEquals("4.0", disabledCount, newDisabledCount);
- assertEquals("4.1", allCount, newAllCount);
+ assertEquals("6.0", disabledCount, newDisabledCount);
+ assertEquals("6.1", allCount, newAllCount);
}
/**

Back to the top