Merge pull request #9428 from abextm/parallel-patch
Download and patch the client in parallel with startup
This commit is contained in:
@@ -1,38 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2016-2017, Adam <Adam@sigterm.info>
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
package net.runelite.client;
|
||||
|
||||
import com.google.inject.Guice;
|
||||
import net.runelite.client.rs.ClientUpdateCheckMode;
|
||||
import org.junit.Test;
|
||||
|
||||
public class RuneLiteModuleTest
|
||||
{
|
||||
@Test
|
||||
public void testConfigure()
|
||||
{
|
||||
Guice.createInjector(new RuneLiteModule(ClientUpdateCheckMode.AUTO, true));
|
||||
}
|
||||
}
|
||||
@@ -51,7 +51,6 @@ import net.runelite.client.RuneLiteModule;
|
||||
import net.runelite.client.eventbus.EventBus;
|
||||
import net.runelite.client.config.Config;
|
||||
import net.runelite.client.config.ConfigItem;
|
||||
import net.runelite.client.rs.ClientUpdateCheckMode;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import org.junit.Before;
|
||||
import org.junit.Rule;
|
||||
@@ -84,7 +83,7 @@ public class PluginManagerTest
|
||||
public void before() throws IOException
|
||||
{
|
||||
Injector injector = Guice.createInjector(Modules
|
||||
.override(new RuneLiteModule(ClientUpdateCheckMode.AUTO, true))
|
||||
.override(new RuneLiteModule(() -> null, true))
|
||||
.with(BoundFieldModule.of(this)));
|
||||
|
||||
RuneLite.setInjector(injector);
|
||||
@@ -108,7 +107,6 @@ public class PluginManagerTest
|
||||
configClasses.add(clazz);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -146,7 +144,7 @@ public class PluginManagerTest
|
||||
{
|
||||
List<Module> modules = new ArrayList<>();
|
||||
modules.add(new GraphvizModule());
|
||||
modules.add(new RuneLiteModule(ClientUpdateCheckMode.AUTO, true));
|
||||
modules.add(new RuneLiteModule(() -> null, true));
|
||||
|
||||
PluginManager pluginManager = new PluginManager(true, null, null, null, null, null);
|
||||
pluginManager.loadCorePlugins();
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
package net.runelite.client.rs;
|
||||
|
||||
import java.io.IOException;
|
||||
import okhttp3.OkHttpClient;
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
@@ -38,8 +37,7 @@ public class ClientConfigLoaderTest
|
||||
@Test
|
||||
public void test() throws IOException
|
||||
{
|
||||
final ClientConfigLoader loader = new ClientConfigLoader(new OkHttpClient());
|
||||
final RSConfig config = loader.fetch();
|
||||
final RSConfig config = ClientConfigLoader.fetch();
|
||||
|
||||
for (String key : config.getClassLoaderProperties().keySet())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user