You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@inlong.apache.org by GitBox <gi...@apache.org> on 2022/02/18 02:05:33 UTC
[GitHub] [incubator-inlong] ciscozhou opened a new issue #2571: [Bug][Manager] Fix unit tests bugs
ciscozhou opened a new issue #2571:
URL: https://github.com/apache/incubator-inlong/issues/2571
### What happened
When i execute `mvn test`, the follow error happened:
```
Error: Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 5.697 s <<< FAILURE! - in org.apache.inlong.manager.service.core.impl.AgentHeartBeatServiceImplTest
Error: heartbeat Time elapsed: 0.016 s <<< ERROR!
java.lang.IllegalStateException: Failed to load ApplicationContext
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException:
Error creating bean with name 'agentHeartBeatServiceImpl': Unsatisfied dependency expressed through field 'agentHeartBeatLogEntityMapper'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'agentHeartBeatLogEntityMapper' defined in file [/home/runner/work/incubator-inlong/incubator-inlong/inlong-manager/manager-dao/target/classes/org/apache/inlong/manager/dao/mapper/AgentHeartBeatLogEntityMapper.class]: Cannot resolve reference to bean 'sqlSessionTemplate' while setting bean property 'sqlSessionTemplate'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionTemplate' defined in class path resource [org/apache/inlong/manager/dao/config/InLongManagerDatasourceConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.mybatis.spring.SqlSessionTemplate]: Factory m
ethod 'sqlSessionTemplate' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [org/apache/inlong/manager/dao/config/InLongManagerDatasourceConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.ibatis.session.SqlSessionFactory]: Factory method 'sqlSessionFactory' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/apache/inlong/manager/dao/config/InLongManagerDatasourceConfig.class]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.boot.autoconfigure.jdbc.DataSourceInitializerInvoker': Invocation of init method failed; nes
ted exception is org.springframework.jdbc.datasource.init.ScriptStatementFailedException: Failed to execute SQL script statement #55 of class path resource [sql/apache_inlong_manager.sql]: CREATE TABLE `task` ( `id` bigint(20) NOT NULL, `taskflow_id` bigint(20) NOT NULL COMMENT 'Owning task flow id', `task_def_id` bigint(20) DEFAULT NULL COMMENT 'task definition id', `task_name` varchar(256) NOT NULL COMMENT 'task name', `status` varchar(256) DEFAULT NULL COMMENT 'task status', `post_param` varchar(256) DEFAULT NULL COMMENT 'Task parameters', `resultmsg` varchar(1000) DEFAULT NULL COMMENT 'Execution result log', `create_time` datetime NOT NULL COMMENT 'Create time', `create_by` varchar(256) NOT NULL COMMENT 'creator', `update_time` datetime DEFAULT NULL COMMENT 'last modified time', `update_by` varchar(0) DEFAULT NULL COMMENT 'last modified person', PRIMARY KEY (`id`) ); nested exception is org.h2.jdbc.JdbcSQLDataException: Invalid value "0" for parameter "positive long"; SQL statem
ent:
CREATE TABLE `task` ( `id` bigint(20) NOT NULL, `taskflow_id` bigint(20) NOT NULL COMMENT 'Owning task flow id', `task_def_id` bigint(20) DEFAULT NULL COMMENT 'task definition id', `task_name` varchar(256) NOT NULL COMMENT 'task name', `status` varchar(256) DEFAULT NULL COMMENT 'task status', `post_param` varchar(256) DEFAULT NULL COMMENT 'Task parameters', `resultmsg` varchar(1000) DEFAULT NULL COMMENT 'Execution result log', `create_time` datetime NOT NULL COMMENT 'Create time', `create_by` varchar(256) NOT NULL COMMENT 'creator', `update_time` datetime DEFAULT NULL COMMENT 'last modified time', `update_by` varchar(0) DEFAULT NULL COMMENT 'last modified person', PRIMARY KEY (`id`) ) [90008-210]
```
### What you expected to happen
There should no error happened.
### How to reproduce
Just execute following command:
```
mvn test
```
### Environment
_No response_
### InLong version
master
### InLong Component
InLong Manager
### Are you willing to submit PR?
- [X] Yes, I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@inlong.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-inlong] gosonzhang closed issue #2571: [Bug][Manager] Fix unit tests bugs
Posted by GitBox <gi...@apache.org>.
gosonzhang closed issue #2571:
URL: https://github.com/apache/incubator-inlong/issues/2571
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@inlong.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org