-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CUST-110209: do SDK maven snapshot release on push and use the snapsh…
…ot SDK in smoke test. Add a new app test the sdk without the agent being attached
- Loading branch information
1 parent
5a747d3
commit f48ee59
Showing
8 changed files
with
194 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import java.net.URI | ||
|
||
/* | ||
* © SolarWinds Worldwide, LLC. All rights reserved. | ||
* | ||
* Licensed 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. | ||
*/ | ||
|
||
plugins { | ||
java | ||
application | ||
} | ||
|
||
group = "com.solarwinds" | ||
version = "unspecified" | ||
|
||
repositories { | ||
mavenCentral() | ||
maven { | ||
url = URI.create("https://s01.oss.sonatype.org/content/repositories/snapshots/") | ||
credentials { | ||
username = System.getenv("SONATYPE_USERNAME") | ||
password = System.getenv("SONATYPE_TOKEN") | ||
} | ||
} | ||
} | ||
|
||
val sdkVersion = System.getenv("AGENT_VERSION")?.also { println("Using SDK version: $it") } ?: "2.6.0" | ||
dependencies { | ||
implementation("io.netty:netty-common:4.1.94.Final") | ||
implementation("io.github.appoptics:solarwinds-otel-sdk:$sdkVersion-SNAPSHOT") | ||
testImplementation(platform("org.junit:junit-bom:5.9.1")) | ||
testImplementation("org.junit.jupiter:junit-jupiter") | ||
} | ||
|
||
tasks.test { | ||
useJUnitPlatform() | ||
} | ||
|
||
application { | ||
mainClass.set("com.solarwinds.netty.NettyApp") | ||
} |
35 changes: 35 additions & 0 deletions
35
smoke-tests/netty-test-no-agent/src/main/java/com/solarwinds/netty/NettyApp.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* © SolarWinds Worldwide, LLC. All rights reserved. | ||
* | ||
* Licensed 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 com.solarwinds.netty; | ||
|
||
import io.netty.util.NetUtil; | ||
import com.solarwinds.api.ext.SolarwindsAgent; | ||
|
||
import java.util.concurrent.TimeUnit; | ||
|
||
public class NettyApp { | ||
public static void main(String[] args){ | ||
SolarwindsAgent.setTransactionName("hello world!"); | ||
System.out.printf("Number of interfaces: %d%n",NetUtil.NETWORK_INTERFACES.size()); | ||
try { | ||
TimeUnit.MINUTES.sleep(1); | ||
} catch (InterruptedException ignore) { | ||
|
||
} | ||
System.out.printf("Shutting down%n"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters