gnodet-bot commented on code in PR #13570: URL: https://github.com/apache/maven/pull/13570#discussion_r4480155920
########## its/core-it-suite/src/test/java/org/apache/maven/it/MavenITgh13306PackagingProviderTest.java: ########## @@ -0,0 +1,57 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.maven.it; + +import java.nio.file.Path; + +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertTrue; + +class MavenITgh13306PackagingProviderTest extends AbstractMavenIntegrationTestCase { + + @Test + void providerFromProjectExtensionIsVisibleOnlyToItsProject() throws Exception { + Path testDir = extractResources("gh-13306-packaging-provider"); + + Verifier verifier = newVerifier(testDir.resolve("extension")); + verifier.setAutoclean(false); + verifier.deleteArtifacts("org.apache.maven.its.gh13306"); + verifier.addCliArgument("install"); + verifier.execute(); + verifier.verifyErrorFreeLog(); + + verifier = newVerifier(testDir.resolve("client")); + verifier.setAutoclean(false); + verifier.addCliArgument("validate"); + verifier.execute(); + verifier.verifyErrorFreeLog(); + + verifier = newVerifier(testDir.resolve("reactor")); + verifier.setAutoclean(false); + verifier.addCliArgument("validate"); Review Comment: ⚠️ **IT test doesn't reproduce the original race condition.** The bug description says the flakiness occurred on **parallel reactor builds** (`PhasingExecutor` processes modules in parallel). The reactor build here runs with the default sequential thread count — `validate` on a parallel build requires `-T 2`: ```suggestion verifier.addCliArgument("-T"); verifier.addCliArgument("2"); verifier.addCliArgument("validate"); ``` Without `-T`, `without-extension` is never processed concurrently with `with-extension`'s extension loading, so the test validates the _isolation_ property (correct) but not the _race condition_ that caused the original flakiness. If the goal is a regression guard for the race, `-T 2` or `-T 1C` should be added. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
