cache: fix cache server to buffer stream socket data, this works with vanilla client
This commit is contained in:
@@ -89,14 +89,27 @@ public class StoreLoadTest
|
||||
@Ignore
|
||||
public void loadTree() throws IOException
|
||||
{
|
||||
Store store = new Store(folder.newFolder());
|
||||
store.loadTree(new java.io.File("C:\\rs\\temp\\tree"));
|
||||
|
||||
try (Store store2 = new Store(StoreLocation.LOCATION))
|
||||
try (Store store = new Store(folder.newFolder()))
|
||||
{
|
||||
store2.load();
|
||||
store.loadTree(new java.io.File("C:\\rs\\temp\\tree"));
|
||||
|
||||
try (Store store2 = new Store(StoreLocation.LOCATION))
|
||||
{
|
||||
store2.load();
|
||||
|
||||
Assert.assertEquals(store, store2);
|
||||
Assert.assertEquals(store, store2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void saveTree() throws IOException
|
||||
{
|
||||
try (Store store = new Store(new java.io.File("d:/rs/07/temp/cache")))
|
||||
{
|
||||
store.load();
|
||||
store.saveTree(new java.io.File("d:/rs/07/temp/tree"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,6 +45,21 @@ public class CacheServerTest
|
||||
@Rule
|
||||
public TemporaryFolder folder = StoreLocation.getTemporaryFolder();
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void run() throws Exception
|
||||
{
|
||||
try (Store store = new Store(new java.io.File("D:\\rs\\07\\temp\\cache139"));
|
||||
CacheServer server = new CacheServer(store, REVISION))
|
||||
{
|
||||
store.load();
|
||||
store.rebuildCrc();
|
||||
|
||||
server.start();
|
||||
server.waitForClose();
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void testDownload() throws Exception
|
||||
|
||||
Reference in New Issue
Block a user