Clean-up where assumption of serializability no longer appropriate

This commit is contained in:
gojomo
2010-01-26 01:25:47 +00:00
parent 248f720cab
commit 1a95e530e8
3 changed files with 5 additions and 16 deletions
@@ -163,8 +163,11 @@ public abstract class ModuleTestBase extends TestCase {
*
* @throws Exception if the module cannot be serialized
*/
public void testSerialization() throws Exception {
public void testSerializationIfAppropriate() throws Exception {
Object first = makeModule();
if(!(first instanceof Serializable)) {
return;
}
byte[] firstBytes = SerializationUtils.serialize((Serializable)first);
Object second = SerializationUtils.deserialize(firstBytes);
@@ -178,7 +181,6 @@ public abstract class ModuleTestBase extends TestCase {
// verifySerialization(first, firstBytes, second, secondBytes);
verifySerialization(first, firstBytes, third, thirdBytes);
}
/**
* Verifies that serialization was successful.
@@ -28,17 +28,6 @@ import org.archive.crawler.framework.CrawlerProcessorTestBase;
*/
public class BdbFrontierTest extends CrawlerProcessorTestBase {
@Override
public void testSerialization() {
// FIXME
}
@Override
protected void verifySerialization(Object first, byte[] firstBytes,
Object second, byte[] secondBytes) throws Exception {
}
// TODO TESTME
}
@@ -20,7 +20,6 @@ package org.archive.modules;
import java.io.IOException;
import java.io.Serializable;
import java.util.Set;
import java.util.concurrent.atomic.AtomicLong;
@@ -49,8 +48,7 @@ import org.springframework.context.Lifecycle;
* @author pjack
*/
public abstract class Processor
implements Serializable,
HasKeyedProperties,
implements HasKeyedProperties,
Lifecycle,
BeanNameAware,
Checkpointable {