Fix App-IDs across examples and tests (#814)

* Update App IDs across examples and ITs

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

* Convert string to lower case

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

* Final

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

* re-trigger pipeline

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

* Update tracing IT

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

* re-trigger pipeline

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

* re-trigger pipeline

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>

Signed-off-by: Shubham Sharma <shubhash@microsoft.com>
Co-authored-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com>
This commit is contained in:
Shubham Sharma 2023-01-05 05:26:04 +05:30 committed by GitHub
parent dcee2f7785
commit 96259e49de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 14 additions and 12 deletions

View File

@ -74,7 +74,7 @@ sleep: 5
-->
```bash
dapr run --app-id exception_example -- java -jar target/dapr-java-sdk-examples-exec.jar io.dapr.examples.exception.Client
dapr run --app-id exception-example -- java -jar target/dapr-java-sdk-examples-exec.jar io.dapr.examples.exception.Client
```
<!-- END_STEP -->
@ -124,7 +124,7 @@ name: Cleanup
-->
```bash
dapr stop --app-id exception_example
dapr stop --app-id exception-example
```
<!-- END_STEP -->

View File

@ -30,7 +30,7 @@ import static io.dapr.examples.OpenTelemetryConfig.getReactorContext;
* mvn clean install
* 2. cd [repo root]/examples
* 3. Run the program:
* dapr run --components-path ./components/pubsub --app-id publisher_tracing -- \
* dapr run --components-path ./components/pubsub --app-id publisher-tracing -- \
* java -jar target/dapr-java-sdk-examples-exec.jar io.dapr.examples.pubsub.http.PublisherWithTracing
*/
public class PublisherWithTracing {

View File

@ -272,7 +272,7 @@ sleep: 15
-->
```bash
dapr run --components-path ./components/pubsub --app-id publisher_tracing -- java -jar target/dapr-java-sdk-examples-exec.jar io.dapr.examples.pubsub.http.PublisherWithTracing
dapr run --components-path ./components/pubsub --app-id publisher-tracing -- java -jar target/dapr-java-sdk-examples-exec.jar io.dapr.examples.pubsub.http.PublisherWithTracing
```
<!-- END_STEP -->

View File

@ -239,7 +239,7 @@ sleep: 10
Run this example with the following command:
```bash
dapr run --components-path ./components/state --app-id query_state_example -H 3600 -- java -Ddapr.api.protocol=HTTP -jar target/dapr-java-sdk-examples-exec.jar io.dapr.examples.querystate.QuerySavedState
dapr run --components-path ./components/state --app-id query-state-example -H 3600 -- java -Ddapr.api.protocol=HTTP -jar target/dapr-java-sdk-examples-exec.jar io.dapr.examples.querystate.QuerySavedState
```
<!-- END_STEP -->
@ -273,7 +273,7 @@ name: Cleanup
-->
```bash
dapr stop --app-id query_state_example
dapr stop --app-id query-state-example
```
<!-- END_STEP -->

View File

@ -162,7 +162,7 @@ sleep: 5
Run this example with the following command:
```bash
dapr run --components-path ./components/state --app-id state_example -- java -jar target/dapr-java-sdk-examples-exec.jar io.dapr.examples.state.StateClient 'my message'
dapr run --components-path ./components/state --app-id state-example -- java -jar target/dapr-java-sdk-examples-exec.jar io.dapr.examples.state.StateClient 'my message'
```
<!-- END_STEP -->
@ -198,7 +198,7 @@ name: Cleanup
-->
```bash
dapr stop --app-id state_example
dapr stop --app-id state-example
```
<!-- END_STEP -->

View File

@ -283,7 +283,7 @@ sleep: 20
-->
```bash
dapr run -- java -jar target/dapr-java-sdk-examples-exec.jar io.dapr.examples.tracing.InvokeClient "message one" "message two"
dapr run --app-id tracingdemoclient -- java -jar target/dapr-java-sdk-examples-exec.jar io.dapr.examples.tracing.InvokeClient "message one" "message two"
```
<!-- END_STEP -->

View File

@ -58,7 +58,9 @@ public class DaprRun implements Stoppable {
DaprApiProtocol protocol,
DaprApiProtocol appProtocol) {
// The app name needs to be deterministic since we depend on it to kill previous runs.
this.appName = serviceClass == null ? testName : String.format("%s_%s", testName, serviceClass.getSimpleName());
this.appName = serviceClass == null ?
testName.toLowerCase() :
String.format("%s-%s", testName, serviceClass.getSimpleName()).toLowerCase();
this.startCommand =
new Command(successMessage, buildDaprCommand(this.appName, serviceClass, ports, protocol, appProtocol));
this.listCommand = new Command(

View File

@ -86,6 +86,6 @@ public class TracingIT extends BaseIT {
span.end();
OpenTelemetrySdk.getGlobalTracerManagement().shutdown();
Validation.validate(spanName, "calllocal/tracingit_service/sleepovergrpc");
Validation.validate(spanName, "calllocal/tracingit-service/sleepovergrpc");
}
}

View File

@ -83,7 +83,7 @@ public class TracingIT extends BaseIT {
span.end();
OpenTelemetrySdk.getGlobalTracerManagement().shutdown();
Validation.validate(spanName, "calllocal/tracingit_service/sleep");
Validation.validate(spanName, "calllocal/tracingit-service/sleep");
}
}