Fix various sporadic test failures

* Increase a `default-delay="1000"` for `GatewayInterfaceTests`
to test the late reply scenario
* Use a `ConcurrentHashMap` for `JdbcMessageStore.queryCache`
to avoid a possible `ConcurrentModificationException`
This commit is contained in:
Artem Bilan
2022-02-02 12:36:05 -05:00
parent a493c9c966
commit c7f2c172a6
2 changed files with 4 additions and 4 deletions

View File

@@ -25,7 +25,7 @@
<int:header-enricher>
<int:error-channel ref="errorChannel" overwrite="true"/>
</int:header-enricher>
<int:delayer id="delayer" default-delay="100"/>
<int:delayer id="delayer" default-delay="1000"/>
</int:chain>

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2021 the original author or authors.
* Copyright 2002-2022 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,11 +22,11 @@ import java.sql.SQLException;
import java.sql.Timestamp;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;
import java.util.stream.Stream;
import javax.sql.DataSource;
@@ -171,7 +171,7 @@ public class JdbcMessageStore extends AbstractMessageGroupStore implements Messa
private final String vendorName;
private final Map<Query, String> queryCache = new HashMap<>();
private final Map<Query, String> queryCache = new ConcurrentHashMap<>();
private String region = "DEFAULT";