mirror of
https://github.com/ProjectSWGCore/Holocore.git
synced 2026-09-11 21:45:26 -04:00
Merge pull request #690 from Josh-Larson/improvement_cleanup_test_sleeps
Removed remaining Thread.sleep's from test cases
This commit is contained in:
@@ -3,6 +3,7 @@ package com.projectswg.holocore.services.gameplay.combat
|
||||
import com.projectswg.common.data.CRC
|
||||
import com.projectswg.common.network.packets.swg.login.creation.ClientCreateCharacter
|
||||
import com.projectswg.common.network.packets.swg.zone.object_controller.CommandQueueEnqueue
|
||||
import com.projectswg.common.network.packets.swg.zone.object_controller.CommandTimer
|
||||
import com.projectswg.holocore.intents.support.global.network.InboundPacketIntent
|
||||
import com.projectswg.holocore.services.gameplay.combat.buffs.BuffService
|
||||
import com.projectswg.holocore.resources.support.data.server_info.loader.DataLoader
|
||||
@@ -96,7 +97,7 @@ class AttackCostTest : TestRunnerSimulatedWorld() {
|
||||
val crc = CRC.getCrc("burstrun")
|
||||
|
||||
broadcastAndWait(InboundPacketIntent(player, CommandQueueEnqueue(player.creatureObject.objectId, 0, crc, 0, "")))
|
||||
Thread.sleep(10) // Give the command queue a chance to be processed
|
||||
(player as GenericPlayer).waitForNextPacket(CommandTimer::class.java)
|
||||
}
|
||||
|
||||
private fun createCreatureObject(): CreatureObject {
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.projectswg.holocore.services.gameplay.combat
|
||||
import com.projectswg.common.data.CRC
|
||||
import com.projectswg.common.data.encodables.tangible.PvpStatus
|
||||
import com.projectswg.common.network.packets.swg.zone.object_controller.CommandQueueEnqueue
|
||||
import com.projectswg.common.network.packets.swg.zone.object_controller.CommandTimer
|
||||
import com.projectswg.holocore.intents.gameplay.gcw.faction.FactionIntent
|
||||
import com.projectswg.holocore.intents.gameplay.player.experience.skills.GrantSkillIntent
|
||||
import com.projectswg.holocore.intents.support.global.network.InboundPacketIntent
|
||||
@@ -69,7 +70,7 @@ class FactionPvpTest : TestRunnerSimulatedWorld() {
|
||||
val targetObjectId = target.objectId
|
||||
|
||||
broadcastAndWait(InboundPacketIntent(player, CommandQueueEnqueue(player.creatureObject.objectId, 0, crc, targetObjectId, "")))
|
||||
Thread.sleep(10) // Give the command queue a chance to be processed
|
||||
player.waitForNextPacket(CommandTimer::class.java)
|
||||
}
|
||||
|
||||
private fun createCreatureObject(): GenericCreatureObject {
|
||||
|
||||
Reference in New Issue
Block a user