From 239ee92f41276695f8a4e7472dfa17d537da99b0 Mon Sep 17 00:00:00 2001 From: Harald Musum Date: Tue, 26 May 2020 22:41:13 +0200 Subject: Remove useless tests --- .../config/server/session/SessionCacheTest.java | 41 ---------------------- 1 file changed, 41 deletions(-) delete mode 100644 configserver/src/test/java/com/yahoo/vespa/config/server/session/SessionCacheTest.java 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 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 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)); - } - } -} -- cgit v1.2.3