diff options
author | Harald Musum <musum@verizonmedia.com> | 2020-05-26 22:41:13 +0200 |
---|---|---|
committer | Harald Musum <musum@verizonmedia.com> | 2020-05-26 22:41:22 +0200 |
commit | 239ee92f41276695f8a4e7472dfa17d537da99b0 (patch) | |
tree | 19205c17f771eda2284fb90a871471d6cdde9413 /configserver/src/test | |
parent | 2e32189c679e3a8828071a45f40fa652b3a443cc (diff) |
Remove useless tests
Diffstat (limited to 'configserver/src/test')
-rw-r--r-- | configserver/src/test/java/com/yahoo/vespa/config/server/session/SessionCacheTest.java | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/configserver/src/test/java/com/yahoo/vespa/config/server/session/SessionCacheTest.java b/configserver/src/test/java/com/yahoo/vespa/config/server/session/SessionCacheTest.java deleted file mode 100644 index 15d315bc00a..00000000000 --- a/configserver/src/test/java/com/yahoo/vespa/config/server/session/SessionCacheTest.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -package com.yahoo.vespa.config.server.session; - -import com.yahoo.vespa.curator.mock.MockCurator; -import org.junit.Test; - -import com.yahoo.config.provision.TenantName; - -import static org.hamcrest.core.Is.is; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertThat; - -/** - * @author hmusum - */ -public class SessionCacheTest { - - @Test - public void require_that_sessionrepo_is_initialized() { - SessionCache<TestSession> sessionCache = new SessionCache<>(); - assertNull(sessionCache.getSession(1L)); - sessionCache.addSession(new TestSession(1)); - assertThat(sessionCache.getSession(1L).getSessionId(), is(1L)); - } - - @Test(expected = IllegalArgumentException.class) - public void require_that_adding_existing_session_fails() { - SessionCache<TestSession> sessionCache = new SessionCache<>(); - final TestSession session = new TestSession(1); - sessionCache.addSession(session); - sessionCache.addSession(session); - } - - private class TestSession extends Session { - TestSession(long sessionId) { - super(TenantName.defaultName(), - sessionId, - new MockSessionZKClient(new MockCurator(), TenantName.defaultName(), sessionId)); - } - } -} |