-
Notifications
You must be signed in to change notification settings - Fork 24.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TEST] Unknown scripting annotations raise error (#50343)
Ensure that unknown annotations, such as typo'd `@nondeterministic`, will raise an exception.
- Loading branch information
1 parent
5adbf67
commit b92b91a
Showing
3 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
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
6 changes: 6 additions & 0 deletions
6
...st/resources/org/elasticsearch/painless/spi/org.elasticsearch.painless.annotation.unknown
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# whitelist for annotation tests with unknown annotation | ||
|
||
class org.elasticsearch.painless.AnnotationTestObject @no_import { | ||
void unknownAnnotationMethod() @unknownAnnotation | ||
void unknownAnnotationMethod() @unknownAnootationWithMessage[message="use another method"] | ||
} |
5 changes: 5 additions & 0 deletions
5
...org/elasticsearch/painless/spi/org.elasticsearch.painless.annotation.unknown_with_options
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# whitelist for annotation tests with unknown annotation containing options | ||
|
||
class org.elasticsearch.painless.AnnotationTestObject @no_import { | ||
void unknownAnnotationMethod() @unknownAnootationWithMessage[arg="arg value"] | ||
} |