}
private void testInit0(boolean inParallel) throws IOException, InterruptedException {
final String topic = "MessageStoreManagerUnitTest";
IdWorker idWorker = new IdWorker(0);
final TopicConfig topicConfig = new TopicConfig(topic, this.metaConfig);
topicConfig.setNumPartitions(10);
this.metaConfig.getTopicConfigMap().put("MessageStoreManagerUnitTest", topicConfig);
this.metaConfig.setLoadMessageStoresInParallel(inParallel);
for (int i = 0; i < 10; i++) {
final MessageStore store = this.messageStoreManager.getMessageStore(topic, i);
Assert.assertNull(store);
}
final CountDownLatch latch = new CountDownLatch(1000);
for (int i = 0; i < 10; i++) {
final MessageStore store = this.messageStoreManager.getOrCreateMessageStore(topic, i);
for (int j = 0; j < 100; j++) {
final PutCommand cmd = new PutCommand(topic, i, new byte[1024], null, 0, 0);
final long id = idWorker.nextId();
store.append(id, cmd, new AppendCallback() {
@Override
public void appendComplete(Location location) {
if (location == Location.InvalidLocaltion) {