Skip to content

Commit

Permalink
Fix various sporadic test failures
Browse files Browse the repository at this point in the history
* Increase a `default-delay="1000"` for `GatewayInterfaceTests`
to test the late reply scenario
* Use a `ConcurrentHashMap` for `JdbcMessageStore.queryCache`
to avoid a possible `ConcurrentModificationException`
  • Loading branch information
artembilan committed Feb 2, 2022
1 parent a493c9c commit c7f2c17
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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>


Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -22,11 +22,11 @@
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;
Expand Down Expand Up @@ -171,7 +171,7 @@ public String getSql() {

private final String vendorName;

private final Map<Query, String> queryCache = new HashMap<>();
private final Map<Query, String> queryCache = new ConcurrentHashMap<>();

private String region = "DEFAULT";

Expand Down

0 comments on commit c7f2c17

Please sign in to comment.