mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-15 02:15:34 -04:00
test: cache profiles and pixlyzer data
This commit is contained in:
parent
d8ce0449a2
commit
b502067f28
@ -37,6 +37,7 @@ import java.util.concurrent.atomic.AtomicInteger
|
||||
|
||||
|
||||
object ConnectionTestUtil {
|
||||
private val profiles = createProfiles()
|
||||
|
||||
init {
|
||||
reference()
|
||||
@ -56,7 +57,7 @@ object ConnectionTestUtil {
|
||||
connection.player.startInit()
|
||||
connection::network.forceSet(TestNetwork())
|
||||
connection::events.forceSet(EventMaster())
|
||||
connection::profiles.forceSet(createProfiles())
|
||||
connection::profiles.forceSet(profiles)
|
||||
connection::assetsManager.forceSet(TestAssetsManager)
|
||||
connection::state.forceSet(DataObserver(PlayConnectionStates.PLAYING))
|
||||
connection::tags.forceSet(TagManager())
|
||||
|
@ -24,6 +24,8 @@ import org.testng.SkipException
|
||||
|
||||
object ITUtil {
|
||||
private val profile = createResourcesProfile()
|
||||
private val pixlyzer: MutableMap<Version, Registries> = mutableMapOf()
|
||||
|
||||
|
||||
fun createResourcesProfile(): ResourcesProfile {
|
||||
return ResourcesProfile()
|
||||
@ -36,11 +38,13 @@ object ITUtil {
|
||||
}
|
||||
|
||||
fun loadPixlyzerData(version: Version): Registries {
|
||||
pixlyzer[version]?.let { return it }
|
||||
val registries = Registries(false)
|
||||
|
||||
val data = PixLyzerUtil.loadPixlyzerData(version, profile)
|
||||
|
||||
registries.load(version, data, SimpleLatch(0))
|
||||
pixlyzer[version] = registries
|
||||
|
||||
return registries
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user