seata Saga complex parameter parsing problem

px9o7tmv  于 2个月前  发布在  其他
关注(0)|答案(1)|浏览(35)
  • I have searched the issues of this repository and believe that this is not a duplicate.

Ⅰ. Issue Description

  • 对于 issues bugfix: saga complex parameter deserialization error #4274@anselleeyy 提出的问题,我仔细看了一下 test 模块下 io.seata.saga.engine.db.StateMachineDBTests 类的代码,其选择的 json 解析器是 jackson , 但是其测试案例的 json 流程配置文件确都是默认 fastjson 的。所有才会有报错信息中的 missing type id property '@type'... 提示信息。这是因为 jacksonfastjsonjson 流程配置文件是不一样的。只需要将 https://github.com/seata/seata/blob/462274679fdf5ded79cab4d187dd03d97809f730/test/src/test/resources/saga/spring/statemachine_engine_db_test.xml#L54 这块配置的 json 解析器 换成 fastjson 就行了
  • 对于 pr bugfix: fix saga complex parameter deserialization problem #4062 中提到的问题,我本地测试确实存在,我将测试案例:https://github.com/seata/seata/blob/462274679fdf5ded79cab4d187dd03d97809f730/test/src/test/java/io/seata/saga/engine/StateMachineTests.java#L271 流程调用的方法:https://github.com/seata/seata/blob/462274679fdf5ded79cab4d187dd03d97809f730/test/src/test/java/io/seata/saga/engine/mock/DemoService.java#L103 的返回值改成了 List , 执行测试,从 debug 可以看到信息中可以看到 List<People> 类型的 peopleResult 中有一个元素,但是是 LinkedHashMap 类型的,而不是 People 类型。 可以看一下这块是不是这样@long187。这块之前提交 PR 时,没有来得及提交测试案例场景。

Ⅱ. Describe what happened

If there is an exception, please attach the exception trace:

Just paste your stack trace here!

Ⅲ. Describe what you expected to happen

Ⅳ. How to reproduce it (as minimally and precisely as possible)

  1. xxx
  2. xxx
  3. xxx

Ⅴ. Anything else we need to know?

Ⅵ. Environment:

  • JDK version :
  • Seata version:
  • OS :
  • Others:
wr98u20j

wr98u20j1#

@anselleeyy Pls discuss the issue together.

相关问题