Agree on the goal, just @Ignore is reported but fogotten from my
experience (we have too much tests ;))


Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau


2014-07-16 13:48 GMT+02:00 Andy Gumbrecht <[email protected]>:
> Sure, just it's for the buildbot now. And using @Ignore is good because it
> gets reported on and not forgotten / hidden.
>
> I want to make the test understand it's environment not the other way round.
>
>
> On 16/07/2014 13:32, Romain Manni-Bucau wrote:
>>
>> so instead of @Ignore it (which will stay for sure) I'd add a timeout
>> on it before setting a random port
>>
>>
>> Romain Manni-Bucau
>> Twitter: @rmannibucau
>> Blog: http://rmannibucau.wordpress.com/
>> LinkedIn: http://fr.linkedin.com/in/rmannibucau
>> Github: https://github.com/rmannibucau
>>
>>
>> 2014-07-16 13:27 GMT+02:00 Andy Gumbrecht <[email protected]>:
>>>
>>> Right now it is hanging the buildbot on 1.7.x, but it expects files to be
>>> in
>>> place and uses 8080. Needs updating.
>>> Will check it after a green.
>>>
>>> Andy.
>>>
>>>
>>> On 16/07/2014 13:17, Romain Manni-Bucau wrote:
>>>>
>>>> why?
>>>>
>>>>
>>>> Romain Manni-Bucau
>>>> Twitter: @rmannibucau
>>>> Blog: http://rmannibucau.wordpress.com/
>>>> LinkedIn: http://fr.linkedin.com/in/rmannibucau
>>>> Github: https://github.com/rmannibucau
>>>>
>>>>
>>>>
>>>> ---------- Forwarded message ----------
>>>> From:  <[email protected]>
>>>> Date: 2014-07-16 12:25 GMT+02:00
>>>> Subject: svn commit: r1610961 -
>>>>
>>>>
>>>> /tomee/tomee/branches/tomee-1.7.x/tomee/apache-tomee/src/test/java/org/apache/tomee/RemoteTomEEEJBContainerIT.java
>>>> To: [email protected]
>>>>
>>>>
>>>> Author: andygumbrecht
>>>> Date: Wed Jul 16 10:25:06 2014
>>>> New Revision: 1610961
>>>>
>>>> URL: http://svn.apache.org/r1610961
>>>> Log:
>>>> This looks like a bad test
>>>>
>>>> Modified:
>>>>
>>>>
>>>> tomee/tomee/branches/tomee-1.7.x/tomee/apache-tomee/src/test/java/org/apache/tomee/RemoteTomEEEJBContainerIT.java
>>>>
>>>> Modified:
>>>>
>>>> tomee/tomee/branches/tomee-1.7.x/tomee/apache-tomee/src/test/java/org/apache/tomee/RemoteTomEEEJBContainerIT.java
>>>> URL:
>>>>
>>>> http://svn.apache.org/viewvc/tomee/tomee/branches/tomee-1.7.x/tomee/apache-tomee/src/test/java/org/apache/tomee/RemoteTomEEEJBContainerIT.java?rev=1610961&r1=1610960&r2=1610961&view=diff
>>>>
>>>>
>>>> ==============================================================================
>>>> ---
>>>>
>>>> tomee/tomee/branches/tomee-1.7.x/tomee/apache-tomee/src/test/java/org/apache/tomee/RemoteTomEEEJBContainerIT.java
>>>> (original)
>>>> +++
>>>>
>>>> tomee/tomee/branches/tomee-1.7.x/tomee/apache-tomee/src/test/java/org/apache/tomee/RemoteTomEEEJBContainerIT.java
>>>> Wed Jul 16 10:25:06 2014
>>>> @@ -18,21 +18,23 @@ package org.apache.tomee;
>>>>
>>>>    import org.apache.openejb.loader.Files;
>>>>    import org.apache.openejb.loader.IO;
>>>> +import org.junit.Ignore;
>>>>    import org.junit.Test;
>>>>
>>>>    import javax.ejb.embeddable.EJBContainer;
>>>>    import java.io.File;
>>>>    import java.io.FileFilter;
>>>>    import java.io.FileWriter;
>>>> -import java.io.IOException;
>>>>    import java.net.URL;
>>>>    import java.util.HashMap;
>>>> +import java.util.Hashtable;
>>>>
>>>>    import static org.junit.Assert.assertEquals;
>>>>
>>>> +@Ignore
>>>>    public class RemoteTomEEEJBContainerIT {
>>>>        @Test
>>>> -    public void run() throws IOException {
>>>> +    public void run() throws Exception {
>>>>            final File app = new File("target/mock/webapp");
>>>>            Files.mkdirs(app);
>>>>
>>>> @@ -45,13 +47,23 @@ public class RemoteTomEEEJBContainerIT {
>>>>                container = EJBContainer.createEJBContainer(new
>>>> HashMap<Object, Object>() {{
>>>>                    put(EJBContainer.PROVIDER, "tomee-remote");
>>>>                    put(EJBContainer.MODULES, app.getAbsolutePath());
>>>> -                put("openejb.home", new
>>>> File("target/webprofile-work-dir/").listFiles(new FileFilter() {
>>>> +                final File workDir = new
>>>> File("target/webprofile-work-dir/");
>>>> +                final File[] files = workDir.listFiles(new FileFilter()
>>>> {
>>>>                        @Override
>>>>                        public boolean accept(final File pathname) {
>>>>                            return pathname.isDirectory() &&
>>>> pathname.getName().startsWith("apache-tomcat-");
>>>>                        }
>>>> -                })[0].getAbsolutePath());
>>>> +                });
>>>> +
>>>> +                if (null == files) {
>>>> +                    throw new Exception("File not found: " +
>>>> workDir.getAbsolutePath());
>>>> +                }
>>>> +
>>>> +                put("openejb.home", files[0].getAbsolutePath());
>>>>                }});
>>>> +
>>>> +            final Hashtable<?, ?> environment =
>>>> container.getContext().getEnvironment();
>>>> +
>>>>                assertEquals("Hello", IO.slurp(new
>>>> URL("http://localhost:8080/webapp/index.html";)));
>>>>            } finally {
>>>>                if (container != null) {
>>>>
>>>>
>>> --
>>>    Andy Gumbrecht
>>>
>>>    http://www.tomitribe.com
>>>    [email protected]
>>>    https://twitter.com/AndyGeeDe
>>>
>>>    TomEE treibt Tomitribe! | http://tomee.apache.org
>>>
>>
>
> --
>   Andy Gumbrecht
>
>   http://www.tomitribe.com
>   [email protected]
>   https://twitter.com/AndyGeeDe
>
>   TomEE treibt Tomitribe! | http://tomee.apache.org
>

Reply via email to