diff options
author | subhash.kumar.singh <subhash.kumar.singh@huawei.com> | 2019-09-19 12:35:39 +0530 |
---|---|---|
committer | subhash.kumar.singh <subhash.kumar.singh@huawei.com> | 2019-09-19 14:20:42 +0530 |
commit | 524904eaedd84201ae008c9098aebcaa69181d14 (patch) | |
tree | dcc5e986956013349512f02ea02cbc11978c11a4 /mdbc-server | |
parent | a05dc5ddab778a0305402c8d1ecb6297e9fbd9aa (diff) |
Remove duplicate table creation
Remove code to create table as it is already done by the MusicMixin
constructor.
Added java8 syntax enhancement.
Change-Id: Ic04987d701e969466f40fbe255576b85206032f9
Signed-off-by: subhash.kumar.singh <subhash.kumar.singh@huawei.com>
Issue-ID: MUSIC-412
Diffstat (limited to 'mdbc-server')
-rw-r--r-- | mdbc-server/src/test/java/org/onap/music/mdbc/MdbcTestUtils.java | 10 | ||||
-rw-r--r-- | mdbc-server/src/test/java/org/onap/music/mdbc/mixins/MusicMixinTest.java | 18 |
2 files changed, 2 insertions, 26 deletions
diff --git a/mdbc-server/src/test/java/org/onap/music/mdbc/MdbcTestUtils.java b/mdbc-server/src/test/java/org/onap/music/mdbc/MdbcTestUtils.java index f7dd8ee..26256eb 100644 --- a/mdbc-server/src/test/java/org/onap/music/mdbc/MdbcTestUtils.java +++ b/mdbc-server/src/test/java/org/onap/music/mdbc/MdbcTestUtils.java @@ -249,7 +249,6 @@ public class MdbcTestUtils { public static MusicMixin getMusicMixin() throws MDBCServiceException { initNamespaces(); - initTables(); MusicMixin mixin=null; try { Properties properties = new Properties(); @@ -268,13 +267,4 @@ public class MdbcTestUtils { MusicMixin.createKeyspace("music_internal",1); MusicMixin.createKeyspace(keyspace,1); } - - public static void initTables() throws MDBCServiceException{ - MusicMixin.createMusicRangeInformationTable(keyspace, mriTableName); - MusicMixin.createMusicTxDigest(mtdTableName,keyspace, -1); - MusicMixin.createMusicEventualTxDigest(eventualMtxdTableName,keyspace, -1); - MusicMixin.createMusicNodeInfoTable(nodeInfoTableName,keyspace,-1); - MusicMixin.createMusicRangeDependencyTable(keyspace,rangeDependencyTableName); - } - } diff --git a/mdbc-server/src/test/java/org/onap/music/mdbc/mixins/MusicMixinTest.java b/mdbc-server/src/test/java/org/onap/music/mdbc/mixins/MusicMixinTest.java index ef26cb6..9800126 100644 --- a/mdbc-server/src/test/java/org/onap/music/mdbc/mixins/MusicMixinTest.java +++ b/mdbc-server/src/test/java/org/onap/music/mdbc/mixins/MusicMixinTest.java @@ -107,7 +107,7 @@ public class MusicMixinTest { public void initTest() throws MDBCServiceException { session = MdbcTestUtils.getSession(); session.execute("DROP KEYSPACE IF EXISTS "+ MdbcTestUtils.getKeyspace()); - mixin=MdbcTestUtils.getMusicMixin(); + mixin = MdbcTestUtils.getMusicMixin(); } //@Test(timeout=10000) @@ -253,21 +253,7 @@ public class MusicMixinTest { mixin.addEventualTxDigest(digestId, compressed); LinkedHashMap<UUID, StagingTable> digest = mixin.getEveTxDigest("n1"); - - Consumer<Map.Entry<UUID,StagingTable>> consumer = new Consumer<Map.Entry<UUID,StagingTable>>() { - - @Override - public void accept(Entry<UUID, StagingTable> mapEntry) { - assertNotNull(mapEntry.getValue()); - } - - }; - - digest.entrySet().forEach(consumer); - - - - + digest.entrySet().forEach(e -> assertNotNull(e.getValue())); } protected ByteBuffer mockCompressedProtoByteBuff() throws MDBCServiceException, InvalidProtocolBufferException { |