|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.fcrepo.test.integration.cma.ConflictingDeploymentTests
public class ConflictingDeploymentTests
Tests for reasonable/predictable behaviour when sDeps conflict.
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 Summary | |
|---|---|
ConflictingDeploymentTests()
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ConflictingDeploymentTests()
| Method Detail |
|---|
public static junit.framework.Test suite()
public void setUp()
throws Exception
Exception
public void tearDown()
throws Exception
Exception
public void testDeployFirstIngested12()
throws Exception
Exception
public void testDeployFirstIngested21()
throws Exception
Exception
public void testModifyOldestSdep()
throws Exception
Exception
public void testModifyNewestSdep()
throws Exception
Exception
public void testPurgeReplace()
throws Exception
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||