Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Functions Archetype has outdated Test class #70

Closed
brunoborges opened this issue Sep 21, 2018 · 4 comments
Closed

Functions Archetype has outdated Test class #70

brunoborges opened this issue Sep 21, 2018 · 4 comments

Comments

@brunoborges
Copy link
Member

Generated a project using the latest archetype.

Test class does not compile as it references old APIs.

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.361 s
[INFO] Finished at: 2018-09-21T09:04:34-07:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:testCompile (default-testCompile) on project myfuncsep18: Compilation failure: Compilation failure:
[ERROR] /Users/bruno/work/azure/demos/myfuncsep18/src/test/java/com/microsoft/samples/FunctionTest.java:[55,25] cannot find symbol
[ERROR]   symbol:   method getStatus()
[ERROR]   location: variable ret of type com.microsoft.azure.functions.HttpResponseMessage
[ERROR] /Users/bruno/work/azure/demos/myfuncsep18/src/test/java/com/microsoft/samples/HttpResponseMessageMock.java:[10,8] com.microsoft.samples.HttpResponseMessageMock is not abstract and does not override abstract method getHttpStatus() in com.microsoft.azure.functions.HttpResponseMessage
[ERROR] /Users/bruno/work/azure/demos/myfuncsep18/src/test/java/com/microsoft/samples/HttpResponseMessageMock.java:[21,5] method does not override or implement a method from a supertype
[ERROR] /Users/bruno/work/azure/demos/myfuncsep18/src/test/java/com/microsoft/samples/HttpResponseMessageMock.java:[34,19] com.microsoft.samples.HttpResponseMessageMock.HttpResponseMessageBuilderMock is not abstract and does not override abstract method status(int) in com.microsoft.azure.functions.HttpResponseMessage.Builder
@brunoborges
Copy link
Member Author

//cc @pragnagopa

@pragnagopa
Copy link
Member

@jdneo - Can you please take a look?

@Flanker32
Copy link
Member

@brunoborges
Can you share more detail infos to reproduce the issue or share the project? I create a project by mvn archetype:generate -DarchetypeGroupId=com.microsoft.azure -DarchetypeArtifactId=azure-functions-archetype and runs mvn clean package, it seems work well.

[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ test ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 2 source files to C:\Users\hanli\Documents\codes\test\test\target\test-classes
[WARNING] /C:/Users/hanli/Documents/codes/test/test/src/test/java/com/mc/FunctionTest.java: C:\Users\hanli\Documents\codes\test\test\src\test\java\com\mc\FunctionTest.java uses unchecked or unsafe operations.
[WARNING] /C:/Users/hanli/Documents/codes/test/test/src/test/java/com/mc/FunctionTest.java: Recompile with -Xlint:unchecked for details.
[INFO]

@brunoborges
Copy link
Member Author

After cleaning up my Maven local repository, and downloading the official released bits, it worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants