Fix race condition causing occasional build failures

This commit is contained in:
Kris De Volder
2019-05-10 12:24:58 -07:00
parent 8bfbff8c44
commit e1c3124e65
2 changed files with 5 additions and 4 deletions

View File

@@ -290,7 +290,7 @@ resources:
########################################################################################
jobs:
- name: concourse-ls-tests
max_in_flight: 4
max_in_flight: 6
plan:
- get: every-minute
trigger: true

View File

@@ -373,12 +373,13 @@ public class YTypeFactory {
public Map<String, YTypedProperty> getPropertiesMap() {
if (cachedPropertyMap==null) {
cachedPropertyMap = new LinkedHashMap<>();
ImmutableMap.Builder<String, YTypedProperty> builder = ImmutableMap.builder();
for (YTypedProperty p : propertyList) {
cachedPropertyMap.put(p.getName(), p);
builder.put(p.getName(), p);
}
cachedPropertyMap = builder.build();
}
return Collections.unmodifiableMap(cachedPropertyMap);
return cachedPropertyMap;
}
public boolean isAtomic() {