Wow, that works. Thanks for being explicit. That was not at all clear to
me as someone who really doesn't know anything about Maven nor Surefire.
So, that takes care of the first question-- how to skip the tests.
Now, who wants to tackle all the errors I get when I try to actually run
the tests!? And let me backup and state my assumption here-- I'm assuming
that the tests are something anyone can simply clone the repo and run the
build and they should all pass. At least, that's what I'm used to in my
projects and other projects I work with. Is this assumption safe/correct?
Can others run this test suite, or are these errors experienced by everyone
else who tries? I haven't touched any code yet-- this is just a fresh
clone here.
Thanks!
~Brad
*Developer Advocate*
*Ortus Solutions, Corp *
E-mail: brad(a)coldbox.org
ColdBox Platform:
On Tue, Jun 16, 2020 at 8:07 PM Jess Sightler <jsightle(a)redhat.com> wrote:
I'll state it explicitly. The docs that you've pasted say to
just run
-DskipTests (not with any other skip parameters) if you want to build
without running the tests.
On Tue, Jun 16, 2020 at 9:04 PM Brad Wood <bdw429s(a)gmail.com> wrote:
> Hmm, perhaps I was too vague in my original post. I enjoy the extistial
> discussion of Maven and things that might be. But I guess I'm looking for
> much more concrete answers as to
>
> - Why the tests don't pass for me on a plain jane vanilla clone of
> the master branch
> - Why I can't skip them with the build failing
> - If there's some additional hidden information not found in the docs
> that is escaping me
>
> I hear you saying "it's probably best to actually run the tests" and
"you
> can always skip the test execution", but I posted all the bad things that
> happen when I try. I need help here to know how to get the tests to run
> and how to successfully skip tests-- because I followed the docs, and they
> don't work. So... something's gotta' give here.
>
> Thanks!
>
> ~Brad
>
> *Developer Advocate*
> *Ortus Solutions, Corp *
>
> E-mail: brad(a)coldbox.org
> ColdBox Platform:
http://www.coldbox.org
> Blog:
http://www.codersrevolution.com
>
>
>
> On Tue, Jun 16, 2020 at 7:47 PM Bernd Eckenfels <ecki(a)zusammenkunft.net>
> wrote:
>
>> What the section means you can always skip the test execution with the
>> property (you mainly do that for performance reasons, but sometimes you
>> just cannot get all tests to pass).
>>
>> But you cannot skip the Maven Test build phase the first time you run
>> the build, because it has to build that test library (and install it into
>> the local Maven "Repo cache").
>>
>> If you have run the install build once you can - for performance reason
>> also use the Maven.skip.test - at least until you change the project
>> version. However it's probably best to actually run the tests, especially
>> if you plan to submit changes.
>>
>> Gruss
>> Bernd
>>
>>
>> --
>>
http://bernd.eckenfels.net
>> ------------------------------
>> *Von:* Brad Wood <bdw429s(a)gmail.com>
>> *Gesendet:* Wednesday, June 17, 2020 1:52:46 AM
>> *An:* Bernd Eckenfels <ecki(a)zusammenkunft.net>
>> *Cc:* Undertow Developers <undertow-dev(a)lists.jboss.org>
>> *Betreff:* Re: [undertow-dev] Building Undertow
>>
>> Thanks for chiming in, though I'm not sure what that means in regards to
>> whether or not I'm running the build correctly. Is it
>> your understanding that I should be able to run the build without error if
>> I use both of those skip flags? Does the syntax that I showed in my
>> original post demonstrate correct usage of those flags? I'm not a regular
>> Maven user and I've never heard of surefire today, and the docs don't
>> really show a full example of running the build while skipping the tests so
>> I'm unclear on the proper way to do it.
>>
>> Of course, ultimately, I need to know why the tests are failing and
>> hanging as well. But for now, just trying to get the build to run!
>>
>> On a related note, some runs of the test suite after my original post
>> gave me these failures additional:
>>
>> [ERROR]
>> testBinary(io.undertow.websockets.core.protocol.WebSocket13ServerTestCase)
>> Time elapsed: 0.02 s <<< ERROR!
>> java.lang.IllegalStateException: ChannelPipeline does not contain an
>> HttpRequestEncoder or HttpClientCodec
>>
>> [ERROR]
>> testCloseFrame(io.undertow.websockets.core.protocol.WebSocket08ServerTest)
>> Time elapsed: 0.013 s <<< ERROR!
>> java.lang.IllegalStateException: ChannelPipeline does not contain an
>> HttpRequestEncoder or HttpClientCodec
>>
>>
>> It really is sort of alarming the number of intermittent issues I'm
>> having with the test suite.
>>
>> Thanks!
>>
>> ~Brad
>>
>> *Developer Advocate*
>> *Ortus Solutions, Corp *
>>
>> E-mail: brad(a)coldbox.org
>> ColdBox Platform:
http://www.coldbox.org
>> Blog:
http://www.codersrevolution.com
>>
>>
>>
>> On Tue, Jun 16, 2020 at 6:36 PM Bernd Eckenfels <ecki(a)zusammenkunft.net>
>> wrote:
>>
>> Maven.skip.test skips the test compile and run, skipTests property only
>> tells surefire to not run and judge the unit tests
>> --
>>
http://bernd.eckenfels.net
>> ------------------------------
>> *Von:* undertow-dev-bounces(a)lists.jboss.org <
>> undertow-dev-bounces(a)lists.jboss.org> im Auftrag von Brad Wood <
>> bdw429s(a)gmail.com>
>> *Gesendet:* Tuesday, June 16, 2020 9:21:55 PM
>> *An:* Undertow Developers <undertow-dev(a)lists.jboss.org>
>> *Betreff:* [undertow-dev] Building Undertow
>>
>> I'm trying to build Undertow using the (sparse) instructions here and
>> having a heck of a time.
>>
>>
https://undertow.io/undertow-docs/undertow-docs-2.1.0/index.html
>>
>> cd undertow && mvn install
>>
>> So firstly, I'm not super familiar with Maven (not a full time java dev)
>> but when I skip the tests, the build fails. Here is the note in the docs,
>> which is confusing for a couple reasons:
>>
>> If you attempt to build with -Dmaven.test.skip=true for your initial
>> build the build will fail, as the core test jar will not be built and the
>> Servlet module has a test scoped dependency on this jar. Either use
>> -DskipTests, or just let the tests run the first time.
>>
>>
>> - First it says the build will fail if the tests are skipped, but
>> then seems to imply that I can work around this by setting some system
>> properties.
>> - What is the difference between the *maven.test.skip* property and
>> the * skiptests* property? Do I need both of them?
>>
>> If I try to run the build like so (Using Maven 3.6.3 and java 11) using
>> a fresh clone of the Undertow repo with the "master" branch checked
out:
>>
>> mvn install -Dmaven.test.skip=true -DskipTests
>>
>>
>> I get this build failure still:
>>
>> [ERROR] Failed to execute goal on project undertow-servlet: Could not
>> resolve dependencies for project
>> io.undertow:undertow-servlet:jar:2.1.4.Final-SN
>> APSHOT: Could not find artifact
>> io.undertow:undertow-core:jar:tests:2.1.4.Final-SNAPSHOT -> [Help 1]
>>
>>
>> So, I'm not sure what to do there. The docs state that setting those
>> JVM args is an alternative to running the tests but it doesn't work.
>>
>> Now, the first thing I tried was actually just to let the tests run, but
>> this proved to be even more troublesome than skipping the tests! I get
>> tons of test failures and other errors and the behavior differs whether I'm
>> using Java 8 or Java 11 (fun!) and the tests usually just hang and won't
>> complete.
>>
>> When I run the build (with tests) on Java 1.8.0_161 they hang on this
>> test and never finish.
>>
>> [INFO] Running io.undertow.server.handlers.ReceiverTestCase
>>
>>
>> When I run the build (with tests) on Java 11.0.6, I get the following
>> errors:
>>
>> [ERROR]
>>
testSpnegoSuccess(io.undertow.server.security.SpnegoDigestAuthenticationTestCase)
>> Time elapsed: 0.01 s <<< FAILURE!
>> java.lang.AssertionError: Expected header not found.
>>
>> [ERROR]
>> testSpnegoSuccess(io.undertow.server.security.SpnegoBasicAuthenticationTestCase)
>> Time elapsed: 0 s <<< FAILURE!
>> java.lang.AssertionError: Expected header not found.
>>
>> [ERROR]
>> testSpnegoSuccess(io.undertow.server.security.SpnegoAuthenticationTestCase)
>> Time elapsed: 0 s <<< FAILURE!
>> java.lang.AssertionError: expected:<401> but was:<403>
>>
>> [ERROR]
>>
testNonDefaultFileSystem(io.undertow.server.handlers.file.PathResourceManagerTestCase)
>> Time elapsed: 0.042 s <<< FAILURE!
>> java.lang.AssertionError: expected:</dir/resource.txt> but
>> was:</dir/./resource.txt>
>>
>> [ERROR]
>> testRegexPattern(io.undertow.server.handlers.SameSiteCookieHandlerTestCase)
>> Time elapsed: 0.027 s <<< ERROR!
>> javax.net.ssl.SSLException: Connection reset
>>
>>
>> And then it hangs on the same test case that Java 8 hangs on
>> (io.undertow.server.handlers.ReceiverTestCase)
>>
>> What does it take to get a local build of Undertow working? If it
>> matters, I'm trying to build on a Windows 7 machine.
>>
>> Thanks!
>>
>> ~Brad
>>
>> *Developer Advocate*
>> *Ortus Solutions, Corp *
>>
>> E-mail: brad(a)coldbox.org
>> ColdBox Platform:
http://www.coldbox.org
>> Blog:
http://www.codersrevolution.com
>>
>> _______________________________________________
> undertow-dev mailing list
> undertow-dev(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/undertow-dev