AMashenkov commented on code in PR #4430: URL: https://github.com/apache/ignite-3/pull/4430#discussion_r1778750143
########## modules/table/src/integrationTest/java/org/apache/ignite/internal/table/ItKeyValueViewApiTest.java: ########## @@ -0,0 +1,621 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.table; + +import static org.apache.ignite.internal.table.KeyValueTestUtils.newKey; +import static org.apache.ignite.internal.table.KeyValueTestUtils.newValue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.Random; +import org.apache.ignite.internal.lang.IgniteStringFormatter; +import org.apache.ignite.internal.marshaller.testobjects.TestObjectWithAllTypes; +import org.apache.ignite.internal.table.KeyValueTestUtils.TestKeyObject; +import org.apache.ignite.internal.testframework.IgniteTestUtils; +import org.apache.ignite.table.KeyValueView; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.function.Executable; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.Arguments; +import org.junit.jupiter.params.provider.MethodSource; + +/** + * Unified KeyValueView API test with composite value type. + */ +public class ItKeyValueViewApiTest extends ItKeyValueViewApiBaseTest { + private static final String TABLE_NAME_COMPOSITE_TYPE = "test"; + + private final long seed = System.currentTimeMillis(); + + private final Random rnd = new Random(seed); + + @BeforeAll + public void createTable() { + createTable(TABLE_NAME_COMPOSITE_TYPE, List.of(KeyValueTestUtils.ALL_TYPES_COLUMNS)); + } + + @BeforeEach + void printSeed() { + log.info("Seed: " + seed); + } + + @ParameterizedTest + @MethodSource("testCases") + public void put(TestCase<TestKeyObject, TestObjectWithAllTypes> testCase) { + KeyValueView<TestKeyObject, TestObjectWithAllTypes> view = testCase.view(); + TestKeyObject key = newKey(rnd); + TestObjectWithAllTypes obj = newValue(rnd); + TestObjectWithAllTypes obj2 = newValue(rnd); + TestObjectWithAllTypes obj3 = newValue(rnd); + + // KeyValueView<TestKeyObject, TestObjectWithAllTypes> view = defaultView(); Review Comment: ```suggestion ``` -- 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: notifications-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org