diff options
author | Harald Musum <musum@oath.com> | 2017-09-20 13:50:57 +0200 |
---|---|---|
committer | Harald Musum <musum@oath.com> | 2017-09-20 13:50:57 +0200 |
commit | f6456f58c53fe0cb3486a3da018edc72b7912552 (patch) | |
tree | d0c9a008a0679b12e400fe6b2d36d2dd4d728876 /configserver | |
parent | b8e9cbb6cdad643d937de3ffbe700fa8114a8a30 (diff) |
Clarify test intent
Diffstat (limited to 'configserver')
-rw-r--r-- | configserver/src/test/java/com/yahoo/vespa/config/server/session/RemoteSessionRepoTest.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/configserver/src/test/java/com/yahoo/vespa/config/server/session/RemoteSessionRepoTest.java b/configserver/src/test/java/com/yahoo/vespa/config/server/session/RemoteSessionRepoTest.java index cbea7c286cc..e4972e0b9b3 100644 --- a/configserver/src/test/java/com/yahoo/vespa/config/server/session/RemoteSessionRepoTest.java +++ b/configserver/src/test/java/com/yahoo/vespa/config/server/session/RemoteSessionRepoTest.java @@ -87,6 +87,10 @@ public class RemoteSessionRepoTest extends TestWithCurator { assertNull(remoteSessionRepo.getSession(0l)); } + // If reading a session throws an exception it should be handled and not prevent other applications + // from loading. In this test we just show that we end up with one session in remote session + // repo even if it had bad data (by making getSessionIdForApplication() in FailingTenantApplications + // throw an exception). @Test public void testBadApplicationRepoOnActivate() throws Exception { TenantApplications applicationRepo = new FailingTenantApplications(); @@ -97,6 +101,7 @@ public class RemoteSessionRepoTest extends TestWithCurator { .withApplicationRepo(applicationRepo) .build(); remoteSessionRepo = tenant.getRemoteSessionRepo(); + assertThat(remoteSessionRepo.listSessions().size(), is(0)); createSession("/mytenant", 2l, true); assertThat(remoteSessionRepo.listSessions().size(), is(1)); } |