use of io.shardingjdbc.core.api.algorithm.masterslave.MasterSlaveLoadBalanceAlgorithm in project sharding-jdbc by shardingjdbc.
the class MasterSlaveNamespaceTest method assertRefMasterSlaveDataSource.
@Test
public void assertRefMasterSlaveDataSource() {
MasterSlaveLoadBalanceAlgorithm randomStrategy = this.applicationContext.getBean("randomStrategy", MasterSlaveLoadBalanceAlgorithm.class);
MasterSlaveRule masterSlaveRule = getMasterSlaveRule("refMasterSlaveDataSource");
assertTrue(masterSlaveRule.getLoadBalanceAlgorithm() == randomStrategy);
}
use of io.shardingjdbc.core.api.algorithm.masterslave.MasterSlaveLoadBalanceAlgorithm in project sharding-jdbc by shardingjdbc.
the class OrchestrationMasterSlaveNamespaceTest method assertRefMasterSlaveDataSource.
@Test
public void assertRefMasterSlaveDataSource() {
MasterSlaveLoadBalanceAlgorithm randomStrategy = this.applicationContext.getBean("randomStrategy", MasterSlaveLoadBalanceAlgorithm.class);
MasterSlaveRule masterSlaveRule = getMasterSlaveRule("refMasterSlaveDataSource");
assertTrue(EqualsBuilder.reflectionEquals(masterSlaveRule.getLoadBalanceAlgorithm(), randomStrategy));
}
Aggregations