cache: remove tree storage
This commit is contained in:
@@ -28,7 +28,6 @@ import java.io.File;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import net.runelite.cache.CacheProperties;
|
||||
import net.runelite.cache.fs.Store;
|
||||
import net.runelite.cache.fs.tree.TreeStorage;
|
||||
import net.runelite.cache.protocol.packets.HandshakeResponseType;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Before;
|
||||
@@ -72,31 +71,4 @@ public class CacheClientTest
|
||||
store.save();
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void testTree() throws Exception
|
||||
{
|
||||
try (Store store = new Store(new File("C:\\rs\\temp")))
|
||||
{
|
||||
TreeStorage storage = new TreeStorage(new File("C:\\rs\\runescape-data\\cache"));
|
||||
storage.load(store);
|
||||
|
||||
CacheClient c = new CacheClient(store, CacheProperties.getRsVersion());
|
||||
c.connect();
|
||||
CompletableFuture<HandshakeResponseType> handshake = c.handshake();
|
||||
|
||||
HandshakeResponseType result = handshake.get();
|
||||
logger.info("Handshake result: {}", result);
|
||||
|
||||
Assert.assertEquals(HandshakeResponseType.RESPONSE_OK, result);
|
||||
|
||||
c.download();
|
||||
|
||||
c.close();
|
||||
|
||||
storage = new TreeStorage(new File("C:\\rs\\temp\\t"));
|
||||
storage.save(store);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,9 +28,7 @@ import com.google.common.io.Files;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import net.runelite.cache.StoreLocation;
|
||||
import net.runelite.cache.fs.tree.TreeStorage;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.rules.TemporaryFolder;
|
||||
@@ -81,49 +79,4 @@ public class StoreLoadTest
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void unpackStore() throws IOException
|
||||
{
|
||||
File base = StoreLocation.LOCATION;
|
||||
try (Store store = new Store(base))
|
||||
{
|
||||
store.load();
|
||||
|
||||
TreeStorage storage = new TreeStorage(folder.newFolder());
|
||||
storage.save(store);
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void loadTree() throws IOException
|
||||
{
|
||||
try (Store store = new Store(folder.newFolder()))
|
||||
{
|
||||
TreeStorage storage = new TreeStorage(new File("C:\\rs\\temp\\tree"));
|
||||
storage.load(store);
|
||||
|
||||
try (Store store2 = new Store(StoreLocation.LOCATION))
|
||||
{
|
||||
store2.load();
|
||||
|
||||
Assert.assertEquals(store, store2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void saveTree() throws IOException
|
||||
{
|
||||
try (Store store = new Store(new File("d:/rs/07/temp/cache")))
|
||||
{
|
||||
store.load();
|
||||
|
||||
TreeStorage storage = new TreeStorage(new File("d:/rs/07/temp/tree"));
|
||||
storage.save(store);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,6 @@ import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.Random;
|
||||
import net.runelite.cache.StoreLocation;
|
||||
import net.runelite.cache.fs.tree.TreeStorage;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
@@ -153,17 +152,6 @@ public class StoreTest
|
||||
|
||||
Assert.assertEquals(store, store2);
|
||||
}
|
||||
|
||||
// Test tree save/load
|
||||
File tree = folder.newFolder();
|
||||
Storage treeStorage = new TreeStorage(tree);
|
||||
|
||||
treeStorage.save(store);
|
||||
|
||||
try (Store store2 = new Store(treeStorage))
|
||||
{
|
||||
store2.load();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user