Skip to content

Commit 4625e0e

Browse files
authored
Add ReferenceManager to azure-core (Azure#24320)
Add ReferenceManager to azure-core
1 parent ab7b5d8 commit 4625e0e

File tree

25 files changed

+405
-23
lines changed

25 files changed

+405
-23
lines changed

eng/code-quality-reports/src/main/resources/spotbugs/spotbugs-exclude.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2426,7 +2426,7 @@
24262426

24272427
<!-- For BinaryData, copying array contents degrades performance. The data returned as byte array from BinaryData is expected to be copied by the call if mutability is desired. -->
24282428
<Match>
2429-
<Class name="com.azure.core.util.implementation.ByteArrayContent"/>
2429+
<Class name="com.azure.core.implementation.util.ByteArrayContent"/>
24302430
<Field name="content"/>
24312431
<Bug pattern="EI_EXPOSE_REP"/>
24322432
</Match>

eng/pipelines/templates/jobs/ci.tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ jobs:
104104
jdkVersionOption: $(JavaTestVersion)
105105
jdkArchitectureOption: 'x64'
106106
publishJUnitResults: false
107-
goals: $(TestGoals)
107+
goals: $(TestGoals) $(AdditionalTestGoals)
108108
# we want to run this when TestFromSource isn't true
109109
condition: and(succeeded(), ne(variables['TestFromSource'],'true'))
110110

@@ -158,7 +158,7 @@ jobs:
158158
# as well as libraries which depend on them and not the other stages in the Maven
159159
# lifecycle that test or verify targets would execute. The libraries were already
160160
# compiled and installed in the previous task, this tasks only runs tests.
161-
goals: $(TestGoals)
161+
goals: $(TestGoals) $(AdditionalTestGoals)
162162
condition: and(succeeded(), and(eq(variables['TestFromSource'],'true'), eq(variables['ShouldRunSourceTests'],'true')))
163163

164164
- template: ../steps/upload-repository-on-failure.yml
@@ -177,6 +177,6 @@ jobs:
177177
condition: and(eq(variables['Agent.OS'], 'Windows_NT'), eq(variables['JavaTestVersion'], '1.11'), eq('${{ parameters.SDKType }}', 'client'))
178178
inputs:
179179
codeCoverageTool: JaCoCo
180-
summaryFileLocation: sdk/${{ parameters.ServiceDirectory }}/target/site/jacoco-aggregate/jacoco.xml
181-
reportDirectory: sdk/${{ parameters.ServiceDirectory }}/target/site/jacoco-aggregate/
180+
summaryFileLocation: sdk/${{ parameters.ServiceDirectory }}/target/site/test-coverage/jacoco.xml
181+
reportDirectory: sdk/${{ parameters.ServiceDirectory }}/target/site/test-coverage/
182182
failIfCoverageEmpty: false

eng/pipelines/templates/stages/platform-matrix.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"JavaTestVersion": [ "1.8", "1.11" ],
1212
"AZURE_TEST_HTTP_CLIENTS": [ "okhttp", "netty" ],
1313
"TestGoals": "surefire:test",
14+
"AdditionalTestGoals": "",
1415
"TestOptions": ""
1516
},
1617
"exclude": [

eng/pipelines/templates/variables/globals.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ variables:
1717
DefaultTestMavenOptions: '$(MemoryOptions) $(LoggingOptions)'
1818
AdditionalOptions: ''
1919
TestFromSource: false
20+
AdditionalTestGoals: ''
2021

2122
skipComponentGovernanceDetection: true
2223
IsDebug: $[coalesce(variables['System.Debug'], 'false')]

sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/ReactorHandlerProviderTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
* Tests {@link ReactorHandlerProvider}.
6161
*/
6262
@Execution(ExecutionMode.SAME_THREAD)
63-
@Isolated("Mutates global ProxySelector")
63+
@Isolated("Mutates the global ProxySelector")
6464
public class ReactorHandlerProviderTest {
6565
private static final String CONNECTION_ID = "test-connection-id";
6666
private static final String FULLY_QUALIFIED_DOMAIN_NAME = "my-hostname.windows.com";

sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/handler/WebSocketsProxyConnectionHandlerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
import static org.mockito.Mockito.when;
4343

4444
@Execution(ExecutionMode.SAME_THREAD)
45-
@Isolated("Mutates global ProxySelector")
45+
@Isolated("Mutates the global ProxySelector")
4646
public class WebSocketsProxyConnectionHandlerTest {
4747
private static final String CONNECTION_ID = "some-connection-id";
4848
private static final String HOSTNAME = "event-hubs.windows.core.net";

sdk/core/azure-core/pom.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,14 @@
292292
<groupId>org.apache.maven.plugins</groupId>
293293
<artifactId>maven-failsafe-plugin</artifactId>
294294
<version>2.22.0</version> <!-- {x-version-update;org.apache.maven.plugins:maven-failsafe-plugin;external_dependency} -->
295+
<configuration>
296+
<!-- This configures failsafe to use the compiled JAR in the build directory. -->
297+
<!-- This was added as running the failsafe goals directly used the class files in the build directory and they don't support MR JARs, as they don't have a MANIFEST. -->
298+
<classesDirectory>${project.build.directory}</classesDirectory>
299+
<additionalClasspathElements>
300+
<additionalClasspathElement>${project.build.directory}${file.separator}${project.artifactId}-${project.version}.jar</additionalClasspathElement>
301+
</additionalClasspathElements>
302+
</configuration>
295303
</plugin>
296304
</plugins>
297305
</build>

sdk/core/azure-core/src/main/java/com/azure/core/util/implementation/BinaryDataContent.java renamed to sdk/core/azure-core/src/main/java/com/azure/core/implementation/util/BinaryDataContent.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License.
33

4-
package com.azure.core.util.implementation;
4+
package com.azure.core.implementation.util;
55

66
import com.azure.core.util.BinaryData;
77
import com.azure.core.util.serializer.JsonSerializer;

sdk/core/azure-core/src/main/java/com/azure/core/util/implementation/ByteArrayContent.java renamed to sdk/core/azure-core/src/main/java/com/azure/core/implementation/util/ByteArrayContent.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License.
33

4-
package com.azure.core.util.implementation;
4+
package com.azure.core.implementation.util;
55

66
import com.azure.core.util.serializer.ObjectSerializer;
77
import com.azure.core.util.serializer.TypeReference;

sdk/core/azure-core/src/main/java/com/azure/core/util/implementation/FileContent.java renamed to sdk/core/azure-core/src/main/java/com/azure/core/implementation/util/FileContent.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License.
33

4-
package com.azure.core.util.implementation;
4+
package com.azure.core.implementation.util;
55

66
import com.azure.core.util.logging.ClientLogger;
77
import com.azure.core.util.serializer.ObjectSerializer;

0 commit comments

Comments
 (0)