Created
February 14, 2019 02:38
-
-
Save jameskleeh/9b3cc3686200c4037223e3599a708135 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/wrong-property-reported/src/main/java/micronaut/problems/ClassUsingPropertyA.java b/wrong-property-reported/src/main/java/micronaut/problems/ClassUsingPropertyA.java | |
index 37fc0ce..f80d222 100644 | |
--- a/wrong-property-reported/src/main/java/micronaut/problems/ClassUsingPropertyA.java | |
+++ b/wrong-property-reported/src/main/java/micronaut/problems/ClassUsingPropertyA.java | |
@@ -2,6 +2,9 @@ package micronaut.problems; | |
import io.micronaut.context.annotation.Property; | |
+import javax.inject.Singleton; | |
+ | |
+@Singleton | |
public class ClassUsingPropertyA { | |
@Property(name = "property.a") | |
diff --git a/wrong-property-reported/src/main/java/micronaut/problems/ScheduledTask.java b/wrong-property-reported/src/main/java/micronaut/problems/ScheduledTask.java | |
index 7eb6925..0d4c19a 100644 | |
--- a/wrong-property-reported/src/main/java/micronaut/problems/ScheduledTask.java | |
+++ b/wrong-property-reported/src/main/java/micronaut/problems/ScheduledTask.java | |
@@ -1,10 +1,12 @@ | |
package micronaut.problems; | |
+import io.micronaut.context.annotation.Parallel; | |
import io.micronaut.scheduling.annotation.Scheduled; | |
public class ScheduledTask { | |
static int counter = 0; | |
+ @Parallel(shutdownOnError = false) | |
@Scheduled(fixedRate = "${property.b}") | |
void task() { | |
counter++; | |
diff --git a/wrong-property-reported/src/test/groovy/micronaut/problems/ConfusingErrorSpec.groovy b/wrong-property-reported/src/test/groovy/micronaut/problems/ConfusingErrorSpec.groovy | |
index 2b52944..81d0ff8 100644 | |
--- a/wrong-property-reported/src/test/groovy/micronaut/problems/ConfusingErrorSpec.groovy | |
+++ b/wrong-property-reported/src/test/groovy/micronaut/problems/ConfusingErrorSpec.groovy | |
@@ -2,6 +2,7 @@ package micronaut.problems | |
import io.micronaut.context.ApplicationContext | |
import io.micronaut.http.client.exceptions.HttpClientException | |
+import spock.lang.Ignore | |
import spock.lang.Specification | |
/** | |
@@ -79,6 +80,7 @@ class ConfusingErrorSpec extends Specification { | |
context.close() | |
} | |
+ @Ignore | |
def "wrong property reported missing - ConfigurationException"(){ | |
given: | |
def context = ApplicationContext | |
diff --git a/wrong-property-reported2/src/main/java/micronaut/problems/ScheduledTask.java b/wrong-property-reported2/src/main/java/micronaut/problems/ScheduledTask.java | |
index 7eb6925..0d4c19a 100644 | |
--- a/wrong-property-reported2/src/main/java/micronaut/problems/ScheduledTask.java | |
+++ b/wrong-property-reported2/src/main/java/micronaut/problems/ScheduledTask.java | |
@@ -1,10 +1,12 @@ | |
package micronaut.problems; | |
+import io.micronaut.context.annotation.Parallel; | |
import io.micronaut.scheduling.annotation.Scheduled; | |
public class ScheduledTask { | |
static int counter = 0; | |
+ @Parallel(shutdownOnError = false) | |
@Scheduled(fixedRate = "${property.b}") | |
void task() { | |
counter++; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment