Skip to content

Commit c5ba0d6

Browse files
committed
Change CountWordsAcitivy output format due to clashing
Signed-off-by: Matheus Cruz <matheuscruz.dev@gmail.com>
1 parent 7b82d73 commit c5ba0d6

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

examples/src/main/java/io/dapr/examples/workflows/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -244,11 +244,11 @@ name: Run Chaining Pattern workflow
244244
match_order: none
245245
output_match_mode: substring
246246
expected_stdout_lines:
247-
- 'Activity returned: 2'
248-
- 'Activity returned: 9'
249-
- 'Activity returned: 21'
247+
- 'Activity returned: 2.'
248+
- 'Activity returned: 9.'
249+
- 'Activity returned: 21.'
250250
- 'Activity returned: 17'
251-
- 'Workflow finished with result: 60'
251+
- 'Workflow finished with result: 42.'
252252
background: true
253253
sleep: 60
254254
timeout_seconds: 60
@@ -276,7 +276,7 @@ Now you can see the logs from worker:
276276
== APP == 2023-11-07 14:52:03,152 {HH:mm:ss.SSS} [main] INFO i.d.e.w.faninout.CountWordsActivity - Activity returned: 9
277277
== APP == 2023-11-07 14:52:03,152 {HH:mm:ss.SSS} [main] INFO i.d.e.w.faninout.CountWordsActivity - Activity finished
278278
== APP == 2023-11-07 14:52:03,167 {HH:mm:ss.SSS} [main] INFO i.d.e.w.faninout.CountWordsActivity - Starting Activity: io.dapr.examples.workflows.faninout.CountWordsActivity
279-
== APP == 2023-11-07 14:52:03,167 {HH:mm:ss.SSS} [main] INFO i.d.e.w.faninout.CountWordsActivity - Activity returned: 21
279+
== APP == 2023-11-07 14:52:03,167 {HH:mm:ss.SSS} [main] INFO i.d.e.w.faninout.CountWordsActivity - Activity returned: 3
280280
== APP == 2023-11-07 14:52:03,167 {HH:mm:ss.SSS} [main] INFO i.d.e.w.faninout.CountWordsActivity - Activity finished
281281
== APP == 2023-11-07 14:52:03,170 {HH:mm:ss.SSS} [main] INFO i.d.e.w.faninout.CountWordsActivity - Starting Activity: io.dapr.examples.workflows.faninout.CountWordsActivity
282282
== APP == 2023-11-07 14:52:03,170 {HH:mm:ss.SSS} [main] INFO i.d.e.w.faninout.CountWordsActivity - Activity returned: 17
@@ -538,4 +538,4 @@ The log from client:
538538
```text
539539
Started a new child-workflow model workflow with instance ID: c2fb9c83-435b-4b55-bdf1-833b39366cfb
540540
workflow instance with ID: c2fb9c83-435b-4b55-bdf1-833b39366cfb completed with result: !wolfkroW rpaD olleH
541-
```
541+
```

examples/src/main/java/io/dapr/examples/workflows/faninout/CountWordsActivity.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ public class CountWordsActivity implements WorkflowActivity {
2424
@Override
2525
public Object run(WorkflowActivityContext ctx) {
2626
Logger logger = LoggerFactory.getLogger(CountWordsActivity.class);
27-
logger.info("Starting Activity: " + ctx.getName());
27+
logger.info("Starting Activity: {}", ctx.getName());
2828

2929
String input = ctx.getInput(String.class);
3030
StringTokenizer tokenizer = new StringTokenizer(input);
3131
int result = tokenizer.countTokens();
3232

33-
logger.info("Activity returned: " + result);
33+
logger.info("Activity returned: {}.", result);
3434
logger.info("Activity finished");
3535

3636
return result;

0 commit comments

Comments
 (0)