mirror of https://github.com/dapr/quickstarts.git
Add tests for pubsub java (#575)
* Add tests for java pubsub Signed-off-by: tanvigour <tanvi.gour@gmail.com> * fix typos Signed-off-by: tanvigour <tanvi.gour@gmail.com>
This commit is contained in:
parent
535420c1ef
commit
7100caccf1
|
@ -22,40 +22,69 @@ And one subscriber:
|
|||
|
||||
### Run Java message publisher app with Dapr
|
||||
|
||||
1. Open a new terminal window and navigate to `checkout` directory:
|
||||
|
||||
```bash
|
||||
cd checkout
|
||||
```
|
||||
|
||||
2. Install dependencies:
|
||||
|
||||
1. Navigate to the directory and install dependencies:
|
||||
|
||||
<!-- STEP
|
||||
name: Install Java dependencies
|
||||
-->
|
||||
|
||||
```bash
|
||||
cd ./checkout
|
||||
mvn clean install
|
||||
```
|
||||
<!-- END_STEP -->
|
||||
|
||||
3. Run the Java publisher app with Dapr:
|
||||
2. Run the Java publisher app with Dapr:
|
||||
<!-- STEP
|
||||
name: Run Java publisher
|
||||
working_dir: ./checkout
|
||||
expected_stdout_lines:
|
||||
- "You're up and running! Both Dapr and your app logs will appear here."
|
||||
- 'Published data: 1'
|
||||
- 'Published data: 2'
|
||||
- "Exited App successfully"
|
||||
- "Exited Dapr successfully"
|
||||
expected_stderr_lines:
|
||||
output_match_mode: substring
|
||||
background: true
|
||||
sleep: 10
|
||||
-->
|
||||
|
||||
```bash
|
||||
dapr run --app-id checkout --components-path ../../../components -- java -jar target/CheckoutService-0.0.1-SNAPSHOT.jar
|
||||
dapr run --app-id checkout --components-path ../../components -- java -jar target/CheckoutService-0.0.1-SNAPSHOT.jar
|
||||
```
|
||||
<!-- END_STEP -->
|
||||
|
||||
### Run Java message subscriber app with Dapr
|
||||
|
||||
1. Open a new terminal window and navigate to `order-processor` directory:
|
||||
|
||||
```bash
|
||||
cd order-processor
|
||||
```
|
||||
|
||||
2. Install dependencies:
|
||||
|
||||
1. Navigate to directory and install dependencies:
|
||||
<!-- STEP
|
||||
name: Install Java dependencies
|
||||
-->
|
||||
|
||||
```bash
|
||||
cd ./order-processor
|
||||
mvn clean install
|
||||
```
|
||||
<!-- END_STEP -->
|
||||
|
||||
3. Run the Java subscriber app with Dapr:
|
||||
|
||||
2. Run the Java subscriber app with Dapr:
|
||||
<!-- STEP
|
||||
name: Run Java publisher
|
||||
working_dir: ./order-processor
|
||||
expected_stdout_lines:
|
||||
- "You're up and running! Both Dapr and your app logs will appear here."
|
||||
- 'Subscriber received: 2'
|
||||
- "Exited Dapr successfully"
|
||||
- "Exited App successfully"
|
||||
expected_stderr_lines:
|
||||
output_match_mode: substring
|
||||
background: true
|
||||
sleep: 10
|
||||
-->
|
||||
```bash
|
||||
dapr run --app-port 8080 --app-id order-processor --components-path ../../../components -- java -jar target/OrderProcessingService-0.0.1-SNAPSHOT.jar
|
||||
dapr run --app-port 8080 --app-id order-processor --components-path ../../components -- java -jar target/OrderProcessingService-0.0.1-SNAPSHOT.jar
|
||||
```
|
||||
<!-- END_STEP -->
|
|
@ -22,40 +22,103 @@ And one subscriber:
|
|||
|
||||
### Run Java message publisher app with Dapr
|
||||
|
||||
1. Open a new terminal window and navigate to `checkout` directory:
|
||||
|
||||
```bash
|
||||
cd checkout
|
||||
```
|
||||
|
||||
2. Install dependencies:
|
||||
1. Install dependencies:
|
||||
|
||||
<!-- STEP
|
||||
name: Install Java dependencies
|
||||
-->
|
||||
|
||||
```bash
|
||||
cd pub_sub/java/http/checkout
|
||||
mvn clean install
|
||||
```
|
||||
<!-- END_STEP -->
|
||||
|
||||
3. Run the Java publisher app with Dapr:
|
||||
2. Run the Java publisher app with Dapr:
|
||||
<!-- STEP
|
||||
name: Run Java publisher
|
||||
expected_stdout_lines:
|
||||
- "You're up and running! Both Dapr and your app logs will appear here."
|
||||
- 'Published data: 1'
|
||||
- 'Published data: 2'
|
||||
- "Exited App successfully"
|
||||
- "Exited Dapr successfully"
|
||||
expected_stderr_lines:
|
||||
output_match_mode: substring
|
||||
background: true
|
||||
sleep: 10
|
||||
-->
|
||||
|
||||
```bash
|
||||
dapr run --app-id checkout --components-path ../../../components -- java -jar target/CheckoutService-0.0.1-SNAPSHOT.jar
|
||||
dapr run --app-id checkout --components-path pub_sub/components -- java -jar pub_sub/java/http/checkout/target/CheckoutService-0.0.1-SNAPSHOT.jar
|
||||
```
|
||||
<!-- END_STEP -->
|
||||
|
||||
### Run Java message subscriber app with Dapr
|
||||
|
||||
1. Open a new terminal window and navigate to `order-processor` directory:
|
||||
|
||||
```bash
|
||||
cd order-processor
|
||||
```
|
||||
|
||||
2. Install dependencies:
|
||||
|
||||
1. Navigate to the directory and install dependencies:
|
||||
|
||||
<!-- STEP
|
||||
name: Install Java dependencies
|
||||
-->
|
||||
|
||||
```bash
|
||||
cd ./checkout
|
||||
mvn clean install
|
||||
```
|
||||
<!-- END_STEP -->
|
||||
|
||||
3. Run the Java subscriber app with Dapr:
|
||||
2. Run the Java publisher app with Dapr:
|
||||
<!-- STEP
|
||||
name: Run Java publisher
|
||||
working_dir: ./checkout
|
||||
expected_stdout_lines:
|
||||
- "You're up and running! Both Dapr and your app logs will appear here."
|
||||
- 'Published data: 1'
|
||||
- 'Published data: 2'
|
||||
- "Exited App successfully"
|
||||
- "Exited Dapr successfully"
|
||||
expected_stderr_lines:
|
||||
output_match_mode: substring
|
||||
background: true
|
||||
sleep: 10
|
||||
-->
|
||||
|
||||
```bash
|
||||
dapr run --app-port 8080 --app-id order-processor --components-path ../../../components -- java -jar target/OrderProcessingService-0.0.1-SNAPSHOT.jar
|
||||
dapr run --app-id checkout --components-path ../../components -- java -jar target/CheckoutService-0.0.1-SNAPSHOT.jar
|
||||
```
|
||||
<!-- END_STEP -->
|
||||
|
||||
### Run Java message subscriber app with Dapr
|
||||
|
||||
|
||||
1. Navigate to directory and install dependencies:
|
||||
<!-- STEP
|
||||
name: Install Java dependencies
|
||||
-->
|
||||
|
||||
```bash
|
||||
cd ./order-processor
|
||||
mvn clean install
|
||||
```
|
||||
<!-- END_STEP -->
|
||||
|
||||
2. Run the Java subscriber app with Dapr:
|
||||
<!-- STEP
|
||||
name: Run Java publisher
|
||||
working_dir: ./order-processor
|
||||
expected_stdout_lines:
|
||||
- "You're up and running! Both Dapr and your app logs will appear here."
|
||||
- 'Subscriber received: 2'
|
||||
- "Exited Dapr successfully"
|
||||
- "Exited App successfully"
|
||||
expected_stderr_lines:
|
||||
output_match_mode: substring
|
||||
background: true
|
||||
sleep: 10
|
||||
-->
|
||||
```bash
|
||||
dapr run --app-port 8080 --app-id order-processor --components-path ../../components -- java -jar target/OrderProcessingService-0.0.1-SNAPSHOT.jar
|
||||
```
|
||||
<!-- END_STEP -->
|
Loading…
Reference in New Issue