oleg-vlsk commented on code in PR #13263: URL: https://github.com/apache/ignite/pull/13263#discussion_r3489436796
########## modules/core/src/test/java/org/apache/ignite/internal/processors/cache/DynamicCacheStartDuringRestartExchangeTest.java: ########## @@ -0,0 +1,349 @@ +/* + * 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.processors.cache; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.ThreadLocalRandom; +import java.util.concurrent.atomic.AtomicBoolean; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.concurrent.atomic.AtomicReference; +import org.apache.ignite.Ignition; +import org.apache.ignite.cache.CacheAtomicityMode; +import org.apache.ignite.cache.CacheMode; +import org.apache.ignite.client.ClientCacheConfiguration; +import org.apache.ignite.client.IgniteClient; +import org.apache.ignite.configuration.CacheConfiguration; +import org.apache.ignite.configuration.ClientConfiguration; +import org.apache.ignite.configuration.ClientConnectorConfiguration; +import org.apache.ignite.configuration.IgniteConfiguration; +import org.apache.ignite.internal.IgniteInternalFuture; +import org.apache.ignite.testframework.GridTestUtils; +import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; +import org.junit.Test; + +import static org.apache.ignite.testframework.GridTestUtils.waitForCondition; + +/** */ +public class DynamicCacheStartDuringRestartExchangeTest extends GridCommonAbstractTest { + /** */ + private static final String ERR_MSG = "Invalid exchange futures state"; + + /** */ + private static final int SRV_NODES = 3; + + /** */ + private static final int CLIENT_THREADS = 32; + + /** */ + private static final int RESTART_CNT = 10; + + /** */ + private static final int FIRST_CLIENT_PORT = 10800; + + /** */ + private static final int CACHE_CFG_CNT = 30; + + /** */ + private final AtomicBoolean stopClients = new AtomicBoolean(); + + /** */ + private final AtomicInteger clientCreateSuccesses = new AtomicInteger(); + + /** */ + private final AtomicReference<Throwable> caughtErr = new AtomicReference<>(); + + /** */ + private final CountDownLatch caughtLatch = new CountDownLatch(1); + + /** */ + private final Map<Integer, ClientCacheConfiguration> cacheConfs = new HashMap<>(); + + /** */ + private Thread.UncaughtExceptionHandler oldUncaughtHnd; + + /** */ + private IgniteInternalFuture<?> startFut; + + /** */ + private IgniteInternalFuture<?> clientFut; Review Comment: Done. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
