Skip to content

Commit 4cd3dad

Browse files
committed
update
1 parent 714d8af commit 4cd3dad

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

databricks-sdk-java/src/main/java/com/databricks/sdk/core/UserAgent.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ private static List<CicdProvider> listCiCdProviders() {
166166
// The 'volatile' keyword ensures that changes to these variables
167167
// are immediately visible to all threads. It prevents instruction
168168
// reordering by the compiler.
169-
private static volatile String cicdProvider = null;
169+
protected static volatile String cicdProvider = null;
170170

171171
protected static Environment env = null;
172172

databricks-sdk-java/src/test/java/com/databricks/sdk/core/UserAgentTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ public void testUserAgentWithSemverValue() {
6565

6666
@Test
6767
public void testUserAgentCicdNoProvider() {
68+
UserAgent.cicdProvider = null;
6869
UserAgent.env =
6970
new Environment(new HashMap<>(), new ArrayList<>(), System.getProperty("os.name"));
7071
Assertions.assertFalse(UserAgent.asString().contains("cicd"));
@@ -73,6 +74,7 @@ public void testUserAgentCicdNoProvider() {
7374

7475
@Test
7576
public void testUserAgentCicdOneProvider() {
77+
UserAgent.cicdProvider = null;
7678
UserAgent.env =
7779
new Environment(
7880
new HashMap<String, String>() {
@@ -88,6 +90,7 @@ public void testUserAgentCicdOneProvider() {
8890

8991
@Test
9092
public void testUserAgentCicdTwoProvider() {
93+
UserAgent.cicdProvider = null;
9194
UserAgent.env =
9295
new Environment(
9396
new HashMap<String, String>() {

0 commit comments

Comments
 (0)