cache: fix cache server to buffer stream socket data, this works with vanilla client

This commit is contained in:
Adam
2017-03-26 12:10:00 -04:00
parent 609b0f1514
commit 9444e8ce37
3 changed files with 74 additions and 20 deletions

View File

@@ -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"));
}
}
}

View File

@@ -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