Move sandbox code into the experimental module to reflect its status

This commit is contained in:
Mike Hearn
2016-11-29 10:59:00 +00:00
parent 03f3c82e2c
commit 7aa20dfbe4
43 changed files with 18 additions and 21 deletions

View File

@ -1,17 +1,15 @@
package net.corda.sandbox; package net.corda.sandbox;
import net.corda.sandbox.costing.RuntimeCostAccounter;
import net.corda.sandbox.costing.*; import net.corda.sandbox.costing.*;
import org.junit.*; import org.junit.*;
import java.io.IOException; import javax.xml.bind.*;
import java.io.InputStream; import java.io.*;
import java.net.URISyntaxException; import java.nio.file.FileSystem;
import java.nio.file.*; import java.nio.file.*;
import java.nio.file.attribute.BasicFileAttributes; import java.nio.file.attribute.*;
import java.util.HashSet; import java.util.*;
import java.util.Set;
import javax.xml.bind.DatatypeConverter;
import static org.junit.Assert.*; import static org.junit.Assert.*;
public class TestUtils { public class TestUtils {

View File

@ -1,15 +1,14 @@
package net.corda.sandbox.costing; package net.corda.sandbox.costing;
import net.corda.sandbox.TestUtils; import net.corda.sandbox.*;
import net.corda.sandbox.WhitelistClassLoader; import org.junit.*;
import java.io.IOException;
import java.lang.reflect.Method; import java.io.*;
import java.net.URISyntaxException; import java.lang.reflect.*;
import java.util.HashSet; import java.net.*;
import org.junit.AfterClass; import java.util.*;
import static org.junit.Assert.*; import static org.junit.Assert.*;
import org.junit.BeforeClass;
import org.junit.Test;
/** /**
* *
@ -29,7 +28,7 @@ public class DeterministicClassInstrumenterTest {
@Test @Test
public void when_given_simple_code_it_executes() throws Exception { public void when_given_simple_code_it_executes() throws Exception {
final Class<?> clz = TestUtils.transformClass("resource/CallObjectMethods.class", 525, 723); final Class<?> clz = TestUtils.transformClass("resource/CallObjectMethods.class", 525, 731);
final Object o = clz.newInstance(); final Object o = clz.newInstance();
final Method allocObj = clz.getMethod("callBasicMethodsOnObject"); final Method allocObj = clz.getMethod("callBasicMethodsOnObject");
final Object ret = allocObj.invoke(o); final Object ret = allocObj.invoke(o);
@ -41,13 +40,13 @@ public class DeterministicClassInstrumenterTest {
@Test @Test
public void when_monitors_are_present_then_they_are_removed() throws Exception { public void when_monitors_are_present_then_they_are_removed() throws Exception {
Class<?> clz = TestUtils.transformClass("resource/SynchronizedBlock.class", 522, 712); Class<?> clz = TestUtils.transformClass("resource/SynchronizedBlock.class", 522, 720);
Object o = clz.newInstance(); Object o = clz.newInstance();
Method allocObj = clz.getMethod("exampleBlockSynchronized"); Method allocObj = clz.getMethod("exampleBlockSynchronized");
Object ret = allocObj.invoke(o); Object ret = allocObj.invoke(o);
assertEquals("Synched", ret); assertEquals("Synched", ret);
clz = TestUtils.transformClass("resource/SynchronizedMethod.class", 420, 585); clz = TestUtils.transformClass("resource/SynchronizedMethod.class", 420, 593);
o = clz.newInstance(); o = clz.newInstance();
allocObj = clz.getMethod("exampleSynchronized"); allocObj = clz.getMethod("exampleSynchronized");
ret = allocObj.invoke(o); ret = allocObj.invoke(o);

View File

@ -7,11 +7,11 @@ include 'core'
include 'node' include 'node'
include 'client' include 'client'
include 'experimental' include 'experimental'
include 'experimental:sandbox'
include 'test-utils' include 'test-utils'
include 'tools:explorer' include 'tools:explorer'
include 'tools:loadtest' include 'tools:loadtest'
include 'docs/source/example-code' // Note that we are deliberately choosing to use '/' here. With ':' gradle would treat the directories as actual projects. include 'docs/source/example-code' // Note that we are deliberately choosing to use '/' here. With ':' gradle would treat the directories as actual projects.
include 'core:sandbox'
include 'samples:attachment-demo' include 'samples:attachment-demo'
include 'samples:trader-demo' include 'samples:trader-demo'
include 'samples:irs-demo' include 'samples:irs-demo'