[
https://issues.apache.org/jira/browse/IGNITE-4211?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15937782#comment-15937782
]
Vyacheslav Daradur edited comment on IGNITE-4211 at 3/23/17 6:18 AM:
---------------------------------------------------------------------
[~avinogradov]
I knew about spring-aop-methods before, but I couldn't understand what you
want. (applies to the your comment on the Upsource)
bq. What?
As I've written here before, I think we have to cover the all new code with
unit tests (if possible and where necessary).
I've added the new get-method.
public <T> T get(Object key, Callable<T> valueLoader)
And I think we have to tests the following cases:
- valueLoader parameter was called only once per same key;
- if a cache contains nothing for a key, a result of valueLoader parameter will
added to the cache correctly;
- if valueLoader parameter throws some exceptions, the new get-method rethrows
the excepted type of exception;
These are main cases wich described in the java-docs on the new method.
All cases above were checked in the unit-tests which you don't like.
bq. Why?
Just make that the any get-methods returned "null".
What happens? - Nothing. Green light in the GridSpringCacheManagerSelfTest.
Tests in the GridSpringCacheManagerSelfTest don't check correct behavior of
get-methods.
Maybe I'm wrong and returned value are checked in the other tests. (other cases
of behavior?)
(upd.I found the bug IGNITE-4823, when SpringCache was covered with unit-tests)
If you don't agree with my approach, and if the test of @Cachenable(sync=true)
is enough for you:
Just write it, I will change the test and then it's done.
Such simple task was delayed for a long time.
was (Author: daradurvs):
[~avinogradov]
I knew about spring-aop-methods before, but I couldn't understand what you
want. (applies to the your comment on the Upsource)
bq. What?
As I've written here before, I think we have to cover the all new code with
unit tests (if possible and where necessary).
I've added the new get-method.
public <T> T get(Object key, Callable<T> valueLoader)
And I think we have to tests the following cases:
- valueLoader parameter was called only once per same key;
- if a cache contains nothing for a key, a result of valueLoader parameter will
added to the cache correctly;
- if valueLoader parameter throws some exceptions, the new get-method rethrows
the excepted type of exception;
These are main cases wich described in the java-docs on the new method.
All cases above were checked in the unit-tests which you don't like.
bq. Why?
Just make that the any get-methods returned "null".
What happens? - Nothing. Green light in the GridSpringCacheManagerSelfTest.
Tests in the GridSpringCacheManagerSelfTest don't check correct behavior of
get-methods.
Maybe I'm wrong and returned value are checked in the other tests. (other cases
of behavior?)
If you don't agree with my approach, and if the test of @Cachenable(sync=true)
is enough for you:
Just write it, I will change the test and then it's done.
Such simple task was delayed for a long time.
> Update Spring dependency to latest stable version
> -------------------------------------------------
>
> Key: IGNITE-4211
> URL: https://issues.apache.org/jira/browse/IGNITE-4211
> Project: Ignite
> Issue Type: Improvement
> Components: build
> Affects Versions: 1.7
> Reporter: Sergey Kozlov
> Assignee: Vyacheslav Daradur
> Fix For: 2.0
>
>
> It seems the Spring dependency looks outdated for now. Apache Ignite still
> uses 4.1.0 released two years ago. Could we to update to latest stable
> version (4.3.4 at the moment)?
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)