public class ConflictingDeploymentTests
extends java.lang.Object
Two Service Deployment objects (SDeps) deployed simultaneously for the same service on the same content model creates a conflict. In general, this is a problem - don't do it. However, there are a few legitimate reasons for wanting to do so, primarily when replacing one SDep with another. Faced with a choice of first removing the old SDep, then replacing it vs. first ingesting/activating a new one, then subsequently removing the old one, we notice that the former situation guarantees a period of time in which there is no SDep for a given service - which may be problematic in situations where downtime is unacceptable.
In order to support replacing sDeps without downtime, Fedora adopts the following policy: If two or more SDep objects deploy the same service for the same content model, then the object with the earliest modification date will be used. Thus, a newly ingested or modified SDep will have a more recent last modified date, and will be ignored until the existing SDep is purged or modified.
These tests verify the above behavior.| Constructor and Description |
|---|
ConflictingDeploymentTests() |
| Modifier and Type | Method and Description |
|---|---|
static void |
bootStrap() |
static void |
cleanUp() |
void |
setUp() |
static junit.framework.Test |
suite() |
void |
tearDown() |
void |
testDeployFirstIngested12()
If two sDeps are ingested, the first one ingested should be the one to
drive the dissemination.
|
void |
testDeployFirstIngested21()
If two sDeps are ingested, the first one ingested should be the one to
drive the dissemination.
|
void |
testModifyNewestSdep()
Modifying the newest SDep should have no effect
|
void |
testModifyOldestSdep()
Modifying the oldest SDep will make it the newest, thus switching the
SDep used.
|
void |
testPurgeReplace()
Represents the most likely case.
|
public static junit.framework.Test suite()
public static void bootStrap()
throws java.lang.Exception
java.lang.Exceptionpublic static void cleanUp()
public void setUp()
throws java.lang.Exception
java.lang.Exceptionpublic void tearDown()
throws java.lang.Exception
java.lang.Exceptionpublic void testDeployFirstIngested12()
throws java.lang.Exception
java.lang.Exceptionpublic void testDeployFirstIngested21()
throws java.lang.Exception
java.lang.Exceptionpublic void testModifyOldestSdep()
throws java.lang.Exception
java.lang.Exceptionpublic void testModifyNewestSdep()
throws java.lang.Exception
java.lang.Exceptionpublic void testPurgeReplace()
throws java.lang.Exception
java.lang.ExceptionCopyright © 2014 DuraSpace. All Rights Reserved.