blob: db5379149a157b2226e058bfd21b993c90e71422 [file] [log] [blame]
/*
* 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 session;
import org.junit.BeforeClass;
import org.junit.ClassRule;
import org.junit.Test;
import org.apache.geode.redis.NativeRedisClusterTestRule;
import org.apache.geode.redis.session.RedisSessionDUnitTest;
public class NativeRedisSessionAcceptanceTest extends RedisSessionDUnitTest {
@ClassRule
public static NativeRedisClusterTestRule redis = new NativeRedisClusterTestRule();
@BeforeClass
public static void setup() {
setupAppPorts();
setupNativeRedis();
startSpringApp(APP1, DEFAULT_SESSION_TIMEOUT, ports.get(SERVER1));
startSpringApp(APP2, DEFAULT_SESSION_TIMEOUT, ports.get(SERVER1));
setupRetry();
}
protected static void setupNativeRedis() {
ports.put(SERVER1, redis.getExposedPorts().get(0));
ports.put(SERVER2, redis.getExposedPorts().get(0));
}
@Override
protected void flushAll() {
redis.flushAll();
}
@Test
public void should_getSessionFromServer1_whenServer2GoesDown() {
// Cannot crash docker-based redis cluster instance (yet).
}
@Test
public void should_getSessionFromServer_whenServerGoesDownAndIsRestarted() {
// Cannot crash docker-based redis cluster instance (yet).
}
@Test
public void should_getSession_whenServer2GoesDown_andAppFailsOverToServer1() {
// Cannot crash docker-based redis cluster instance (yet).
}
}