Skip to content
This repository has been archived by the owner on May 29, 2024. It is now read-only.

Fixes parsing of top-level inherited XML attributes (iss #4) #5

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,11 @@ private void parseRedisStoreAttributes(XMLExtendedStreamReader reader, RedisStor
builder.maxRedirections(Integer.parseInt(value));
break;
}

default: {
Parser80.parseStoreAttribute(reader, i, builder);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd bump the requirement to Infinispan 8.2 so you can use Parser

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, we also on 8.2

break;
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,27 @@ public void testRedisCacheStore() throws Exception
assert store.servers().size() == 2;
}

public void testInheritedCacheStoreAttributes() throws Exception
{
String config = InfinispanStartTag.LATEST +
"<cache-container default-cache=\"default\">" +
" <local-cache name=\"default\">\n" +
" <persistence>\n" +
" <redis-store xmlns=\"urn:infinispan:config:store:redis:"+ InfinispanStartTag.LATEST.majorMinor()+ "\"" +
" shared=\"true\" preload=\"true\" >\n" +
" <redis-server host=\"one\" />\n" +
" </redis-store>\n" +
" </persistence>\n" +
" </local-cache>\n" +
"</cache-container>" +
TestingUtil.INFINISPAN_END_TAG;

RedisStoreConfiguration store = (RedisStoreConfiguration) buildCacheManagerWithCacheStore(config);
assert store.shared();
assert store.preload();
assert store.servers().size() == 1;
}

private StoreConfiguration buildCacheManagerWithCacheStore(final String config)
throws IOException
{
Expand Down