refactor: DualBucket/DualInflowControlManager 클라이언트 분리 및 Bandwidth 방식 변경
- DualBucket 인터페이스에서 클라이언트 메서드 분리 → ClientDualBucket 신규 인터페이스 - DualInflowControlManager 클라이언트 구현 분리 → ClientDualInflowControlManager - DualInflowControlManager @Component 제거 (ClientDualInflowControlManager가 단일 빈) - makeBucket: Bandwidth.simple → Bandwidth.classic + Refill.greedy/intervally 변경 (threshold 버킷을 진짜 기간 쿼터로 동작하도록 수정) - DualRequestProcessor → eapim-online custom 패키지로 이동 (삭제) - ReloadInflowClientControlCommand / RemoveInflowClientControlCommand: instanceof 타입을 ClientDualInflowControlManager로 변경 - 단위 테스트: ClientDualInflowControlManagerMetricsTest 추가, DualInflowControlManagerMetricsTest 클라이언트 케이스 분리 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+5
-5
@@ -11,7 +11,7 @@ import org.springframework.test.util.ReflectionTestUtils;
|
||||
import com.eactive.eai.agent.command.CommandException;
|
||||
import com.eactive.eai.common.inflow.InflowControlManager;
|
||||
import com.eactive.eai.common.inflow.InflowControlUtil;
|
||||
import com.eactive.eai.common.inflow.dual.DualInflowControlManager;
|
||||
import com.eactive.eai.common.inflow.dual.ClientDualInflowControlManager;
|
||||
|
||||
/**
|
||||
* RemoveInflowClientControlCommand 단위 테스트.
|
||||
@@ -21,11 +21,11 @@ import com.eactive.eai.common.inflow.dual.DualInflowControlManager;
|
||||
*/
|
||||
class RemoveInflowClientControlCommandTest {
|
||||
|
||||
private DualInflowControlManager mockDualManager;
|
||||
private ClientDualInflowControlManager mockDualManager;
|
||||
|
||||
@BeforeEach
|
||||
void setUp() {
|
||||
mockDualManager = mock(DualInflowControlManager.class);
|
||||
mockDualManager = mock(ClientDualInflowControlManager.class);
|
||||
ReflectionTestUtils.setField(InflowControlUtil.class, "cachedInflowControlManager", null);
|
||||
}
|
||||
|
||||
@@ -50,11 +50,11 @@ class RemoveInflowClientControlCommandTest {
|
||||
}
|
||||
|
||||
// =========================================================================
|
||||
// DualInflowControlManager 비활성
|
||||
// ClientDualInflowControlManager 비활성
|
||||
// =========================================================================
|
||||
|
||||
@Test
|
||||
void execute_notDualManager_throwsCommandException() {
|
||||
void execute_notClientDualManager_throwsCommandException() {
|
||||
InflowControlManager baseMgr = mock(InflowControlManager.class);
|
||||
ReflectionTestUtils.setField(InflowControlUtil.class, "cachedInflowControlManager", baseMgr);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user