diff --git a/tycho-its/src/test/java/org/eclipse/tycho/test/p2Repository/P2RepositoryPropertiesTest.java b/tycho-its/src/test/java/org/eclipse/tycho/test/p2Repository/P2RepositoryPropertiesTest.java index 0a4714c5d8..56c41f2147 100644 --- a/tycho-its/src/test/java/org/eclipse/tycho/test/p2Repository/P2RepositoryPropertiesTest.java +++ b/tycho-its/src/test/java/org/eclipse/tycho/test/p2Repository/P2RepositoryPropertiesTest.java @@ -78,4 +78,10 @@ public void testPropertyPropagation() throws Exception { assertTrue(properties.containsKey(TychoConstants.PROP_PGP_SIGNATURES) && !properties.get(TychoConstants.PROP_PGP_SIGNATURES).isBlank()); } + + @Override + protected boolean isDisableMirrors() { + // we want to test mirror properties... + return false; + } } diff --git a/tycho-testing-harness/src/main/java/org/eclipse/tycho/test/AbstractTychoIntegrationTest.java b/tycho-testing-harness/src/main/java/org/eclipse/tycho/test/AbstractTychoIntegrationTest.java index e0505f8331..5254ea12d8 100644 --- a/tycho-testing-harness/src/main/java/org/eclipse/tycho/test/AbstractTychoIntegrationTest.java +++ b/tycho-testing-harness/src/main/java/org/eclipse/tycho/test/AbstractTychoIntegrationTest.java @@ -90,6 +90,9 @@ protected Verifier getVerifier(String test, boolean setTargetPlatform, File user Verifier verifier = new Verifier(testDir.getAbsolutePath()); verifier.setForkJvm(isForked()); + if (isDisableMirrors()) { + verifier.setSystemProperty("tycho.disableP2Mirrors", "true"); + } String debug = System.getProperty("tycho.mvnDebug"); if (debug != null) { System.out.println("Preparing to execute Maven in debug mode"); @@ -146,6 +149,14 @@ protected Verifier getVerifier(String test, boolean setTargetPlatform, File user } + /** + * can be overridden by subclass to explicitly enable mirrors, by default they are disabled. + * + */ + protected boolean isDisableMirrors() { + return true; + } + protected boolean isForked() { return true; }