[ 
https://issues.apache.org/jira/browse/IGNITE-4211?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15938364#comment-15938364
 ] 

Anton Vinogradov edited comment on IGNITE-4211 at 3/23/17 2:05 PM:
-------------------------------------------------------------------

[~daradurvs]
> The test class is strange for me, not because I didn't figure it out, but 
> because it had strange behavior.

What do you mean? Please, be more clear.

> @Override public <T> T get(Object key, Class<T> type) {
> return null;
...
> And run all tests in the GridSpringCacheManagerSelfTest. Result = green light.

Breaking of 
{noformat}
@Override public <T> T get(Object key, Class<T> type) {
{noformat}
cause no error because it's not covered by tests.
get(Object key, Class<T> type) can't be call via @Cacheable, so it should be 
checked directly in addition to putIfAbsent().

Breaking of 
{noformat}
@Override public ValueWrapper get(Object key) {
{noformat}
Cause exception, because it covered.

{noformat}
junit.framework.AssertionFailedError: expected:<3> but was:<6>
        at junit.framework.Assert.fail(Assert.java:57)
        at junit.framework.Assert.failNotEquals(Assert.java:329)
        at junit.framework.Assert.assertEquals(Assert.java:78)
        at junit.framework.Assert.assertEquals(Assert.java:234)
        at junit.framework.Assert.assertEquals(Assert.java:241)
        at junit.framework.TestCase.assertEquals(TestCase.java:409)
        at 
org.apache.ignite.cache.spring.GridSpringCacheManagerSelfTest.testDynamicCache(GridSpringCacheManagerSelfTest.java:354)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at junit.framework.TestCase.runTest(TestCase.java:176)
        at 
org.apache.ignite.testframework.junits.GridAbstractTest.runTestInternal(GridAbstractTest.java:1805)
        at 
org.apache.ignite.testframework.junits.GridAbstractTest.access$000(GridAbstractTest.java:119)
        at 
org.apache.ignite.testframework.junits.GridAbstractTest$4.run(GridAbstractTest.java:1720)
        at java.lang.Thread.run(Thread.java:745)
{noformat}

> Same behaviour with new-get-method.

Please explain what did you mean


was (Author: avinogradov):
> The test class is strange for me, not because I didn't figure it out, but 
> because it had strange behavior.

What do you mean? Please, be more clear.

> @Override public <T> T get(Object key, Class<T> type) {
> return null;
...
> And run all tests in the GridSpringCacheManagerSelfTest. Result = green light.

Breaking of 
{noformat}
@Override public <T> T get(Object key, Class<T> type) {
{noformat}
cause no error because it's not covered by tests.
get(Object key, Class<T> type) can't be call via @Cacheable, so it should be 
checked directly in addition to putIfAbsent().

Breaking of 
{noformat}
@Override public ValueWrapper get(Object key) {
{noformat}
Cause exception, because it covered.

{noformat}
junit.framework.AssertionFailedError: expected:<3> but was:<6>
        at junit.framework.Assert.fail(Assert.java:57)
        at junit.framework.Assert.failNotEquals(Assert.java:329)
        at junit.framework.Assert.assertEquals(Assert.java:78)
        at junit.framework.Assert.assertEquals(Assert.java:234)
        at junit.framework.Assert.assertEquals(Assert.java:241)
        at junit.framework.TestCase.assertEquals(TestCase.java:409)
        at 
org.apache.ignite.cache.spring.GridSpringCacheManagerSelfTest.testDynamicCache(GridSpringCacheManagerSelfTest.java:354)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at junit.framework.TestCase.runTest(TestCase.java:176)
        at 
org.apache.ignite.testframework.junits.GridAbstractTest.runTestInternal(GridAbstractTest.java:1805)
        at 
org.apache.ignite.testframework.junits.GridAbstractTest.access$000(GridAbstractTest.java:119)
        at 
org.apache.ignite.testframework.junits.GridAbstractTest$4.run(GridAbstractTest.java:1720)
        at java.lang.Thread.run(Thread.java:745)
{noformat}

> Same behaviour with new-get-method.

Please explain what did you mean

> 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)

Reply via email to