diff --git a/src/main/java/com/avanza/gs/test/MirrorPuConfigurer.java b/src/main/java/com/avanza/gs/test/MirrorPuConfigurer.java index a2591b4..577ce43 100644 --- a/src/main/java/com/avanza/gs/test/MirrorPuConfigurer.java +++ b/src/main/java/com/avanza/gs/test/MirrorPuConfigurer.java @@ -30,6 +30,26 @@ public MirrorPuConfigurer(String puXmlPath) { this.puXmlPath = puXmlPath; } + /** + * @deprecated Use {@link #contextProperty(String, String)} instead. + * E.g. {@code .contextProperty("configSourceId", serviceRegistry.getConfigSourceId())) } + */ + @Deprecated + public MirrorPuConfigurer contextProperties(Properties properties) { + this.properties = properties; + return this; + } + + /** + * @deprecated Use {@link #contextProperty(String, String)} instead. + * E.g. {@code .contextProperty("configSourceId", serviceRegistry.getConfigSourceId())) } + */ + @Deprecated + public MirrorPuConfigurer contextProperties(ContextProperties properties) { + this.properties = properties.getProperties(); + return this; + } + public MirrorPuConfigurer contextProperty(String propertyName, String propertyValue) { this.properties.setProperty(propertyName, propertyValue); return this; diff --git a/src/main/java/com/avanza/gs/test/PartitionedPu.java b/src/main/java/com/avanza/gs/test/PartitionedPu.java index 9fc3dc2..20d0b86 100644 --- a/src/main/java/com/avanza/gs/test/PartitionedPu.java +++ b/src/main/java/com/avanza/gs/test/PartitionedPu.java @@ -42,7 +42,7 @@ public final class PartitionedPu implements PuRunner { private final Integer numberOfPrimaries; private final Integer numberOfBackups; private final Properties contextProperties = new Properties(); - private final Map beanProperies = new HashMap<>(); + private final Map beanProperties = new HashMap<>(); private final String lookupGroupName; private final boolean autostart; private final ApplicationContext parentContext; @@ -53,7 +53,7 @@ public PartitionedPu(PartitionedPuConfigurer configurer) { this.numberOfBackups = configurer.numberOfBackups; this.numberOfPrimaries = configurer.numberOfPrimaries; this.contextProperties.putAll(configurer.contextProperties); - this.beanProperies.putAll(configurer.beanProperies); + this.beanProperties.putAll(configurer.beanProperties); this.lookupGroupName = configurer.lookupGroupName; this.autostart = configurer.autostart; this.parentContext = configurer.parentContext; @@ -115,7 +115,7 @@ private ClusterInfo createClusterInfo() { private BeanLevelProperties createBeanLevelProperties() { BeanLevelProperties beanLevelProperties = new BeanLevelProperties(); beanLevelProperties.setContextProperties(contextProperties); - for (Map.Entry beanProperties : beanProperies.entrySet()) { + for (Map.Entry beanProperties : beanProperties.entrySet()) { beanLevelProperties.setBeanProperties(beanProperties.getKey(), beanProperties.getValue()); } return beanLevelProperties; diff --git a/src/main/java/com/avanza/gs/test/PartitionedPuConfigurer.java b/src/main/java/com/avanza/gs/test/PartitionedPuConfigurer.java index a7946e2..5e455b7 100644 --- a/src/main/java/com/avanza/gs/test/PartitionedPuConfigurer.java +++ b/src/main/java/com/avanza/gs/test/PartitionedPuConfigurer.java @@ -28,7 +28,7 @@ public final class PartitionedPuConfigurer { int numberOfBackups = 0; boolean startAsync = false; Properties contextProperties = new Properties(); - Map beanProperies = new HashMap<>(); + Map beanProperties = new HashMap<>(); String lookupGroupName = JVMGlobalLus.getLookupGroupName(); String spaceName = "test-space"; public boolean autostart = true; @@ -55,7 +55,7 @@ public PartitionedPuConfigurer numberOfBackups(int numberOfBackups) { } public PartitionedPuConfigurer beanProperties(String beanName, Properties beanProperties) { - this.beanProperies.put(beanName, beanProperties); + this.beanProperties.put(beanName, beanProperties); return this; } @@ -85,11 +85,21 @@ public RunningPu configure() { return new RunningPuImpl(new PartitionedPu(this)); } + /** + * @deprecated Use {@link #contextProperty(String, String)} instead. + * E.g. {@code .contextProperty("configSourceId", serviceRegistry.getConfigSourceId())) } + */ + @Deprecated public PartitionedPuConfigurer contextProperties(Properties properties) { this.contextProperties = properties; return this; } - + + /** + * @deprecated Use {@link #contextProperty(String, String)} instead. + * E.g. {@code .contextProperty("configSourceId", serviceRegistry.getConfigSourceId())) } + */ + @Deprecated public PartitionedPuConfigurer contextProperties(ContextProperties properties) { this.contextProperties = properties.getProperties(); return this;