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

broken test org.takes.rq.RqMultipartTest.consumesHttpRequest #253

Closed
dmzaytsev opened this issue May 5, 2015 · 44 comments
Closed

broken test org.takes.rq.RqMultipartTest.consumesHttpRequest #253

dmzaytsev opened this issue May 5, 2015 · 44 comments

Comments

@dmzaytsev
Copy link
Contributor

We have the broken test org.takes.rq.RqMultipartTest.consumesHttpRequest in the master branch

Running org.takes.rq.RqMultipartTest Tests run: 10, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.132 sec <<< FAILURE! - in org.takes.rq.RqMultipartTest consumesHttpRequest(org.takes.rq.RqMultipartTest) Time elapsed: 1.033 sec <<< ERROR! java.io.IOException: Failed POST request to http://localhost:34885/ at com.jcabi.http.request.JdkRequest$1.send(JdkRequest.java:124) at com.jcabi.http.request.BaseRequest.fetchResponse(BaseRequest.java:299) at com.jcabi.http.request.BaseRequest.fetch(BaseRequest.java:214) at org.takes.rq.RqMultipartTest$2.exec(RqMultipartTest.java:308) at org.takes.http.FtRemote.exec(FtRemote.java:118) at org.takes.rq.RqMultipartTest.consumesHttpRequest(RqMultipartTest.java:303) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.apache.maven.surefire.junitcore.pc.Scheduler$1.run(Scheduler.java:318) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Caused by: java.net.SocketException: Connection reset at java.net.SocketInputStream.read(SocketInputStream.java:196) at java.net.SocketInputStream.read(SocketInputStream.java:122) at java.io.BufferedInputStream.fill(BufferedInputStream.java:235) at java.io.BufferedInputStream.read1(BufferedInputStream.java:275) at java.io.BufferedInputStream.read(BufferedInputStream.java:334) at sun.net.www.MeteredStream.read(MeteredStream.java:134) at java.io.FilterInputStream.read(FilterInputStream.java:133) at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:3066) at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:3060) at com.jcabi.http.request.JdkRequest$1.body(JdkRequest.java:189) at com.jcabi.http.request.JdkRequest$1.send(JdkRequest.java:116)

@marcuss
Copy link

marcuss commented May 5, 2015

@dmzaytsev I see the same thing in the merge of my pull request, a question @yegor256 this must be corrected before I can close my already merged pull request? or they are deal with as different issues?

@super132
Copy link
Contributor

super132 commented May 5, 2015

@dmzaytsev I can see that the error is caused by SocketException that Connection reset. Is there something wrong with the container that rultor runs in? I see no problem running the same tests in Appveyor.

@dmzaytsev
Copy link
Contributor Author

@M4Solutions This error is caused by changes in the master branch.
Just wait while the issue will be resolved

@super132 you see Appveyor's log before merge.
If you merge with master and run mvn clean install you will see the error locally

@super132
Copy link
Contributor

super132 commented May 5, 2015

@dmzaytsev , is the build from the Appvegor also a log before merge? It shows that it is building from a commit in master branch and it was successful:

https://ci.appveyor.com/project/yegor256/takes/branch/master

@yegor256
Copy link
Owner

yegor256 commented May 5, 2015

@dmzaytsev I can't reproduce this problem locally :( running tests multiple times, still no error

@yegor256
Copy link
Owner

yegor256 commented May 5, 2015

@dmzaytsev can you reproduce it locally?

@dmzaytsev
Copy link
Contributor Author

@yegor256 sure
I reproduced it locally
windows 7 64 bit

@dmzaytsev
Copy link
Contributor Author

@yegor256 I can't reproduce the issue with another windows desktop.
seems the error depends on the jdk/os version.
I will get access to that desktop a few hours later

@ikhvostenkov
Copy link
Contributor

@yegor256 @dmzaytsev I have this error randomly on linux64 with java 1.7

@dmzaytsev
Copy link
Contributor Author

@yegor256 what version of JDK uses Rultor ?

@yegor256
Copy link
Owner

yegor256 commented May 5, 2015

@dmzaytsev it's 1.7. you can check it yourself, just install Docker locally and run:

docker run -i -t --rm yegor256/rultor /bin/bash

You will get into shell with exactly the same environment as we have in rultor builds.

@dmzaytsev
Copy link
Contributor Author

@yegor256 the error is stable on my enviroment

java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b15)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)
Windows 7 64bit SP 1

I see two issues:

  • the regular expression ".*[^a-z]name=\"([^\"]+)\".*" (RqMultipart.java:109) doesn't extract f-1 from the string "Content-Disposition: form-data; name=\"f-1\""(RqMultipartTest.java:318)
  • if the name is not found so we have broken connection in FtRemote instead exception. I think it is a bug. You can easy reproduce it that way
public void consumesHttpRequest() throws IOException {
        final Take take = new Take() {
            @Override
            public Response act(final Request req) throws IOException {
                return new RsText(
                    new RqPrint(
                        new RqMultipart.Smart(
                            new RqMultipart.Base(req)
                        ).single("f2")
                    ).printBody()
                );
            }
        };
        new FtRemote(take).exec(
            // @checkstyle AnonInnerLengthCheck (50 lines)
            new FtRemote.Script() {
                @Override
                public void exec(final URI home) throws IOException {
                    new JdkRequest(home)
                        .method("POST")
                        .header(
                            "Content-Type",
                            "multipart/form-data; boundary=AaB0zz"
                        )
                        .body()
                        .set(
                            Joiner.on(RqMultipartTest.CRLF).join(
                                "--AaB0zz",
                                "Content-Disposition: form-data; name=\"f1\"",
                                "",
                                "my picture",
                                "--AaB0zz--"
                            )
                        )

@yegor256
Copy link
Owner

yegor256 commented May 5, 2015

@dmzaytsev many thanks!

@yegor256
Copy link
Owner

yegor256 commented May 6, 2015

@davvd this is urgent

@super132
Copy link
Contributor

super132 commented May 6, 2015

@yegor256 , just an update to this issue. I found that PR #210 has been merged by Rultor successfully. Please check the log below:

http://www.rultor.com/t/3570-99185933

The merge was done 9 hours ago from the moment I post this comment. I believe we can retry the merge. Thanks.

@davvd
Copy link

davvd commented May 6, 2015

@dmzaytsev I am aware of the task, give me some time to find a developer...

@davvd
Copy link

davvd commented May 6, 2015

@dmzaytsev I added milestone 1.0 to this issue, let me know if there has to be something else

@davvd davvd added this to the 1.0 milestone May 6, 2015
@davvd davvd added the urgent label May 6, 2015
@davvd
Copy link

davvd commented May 6, 2015

@davvd this is urgent

@yegor256 sure, thanks, I added "urgent" tag to it

yegor256 pushed a commit that referenced this issue May 6, 2015
@davvd
Copy link

davvd commented May 9, 2015

@Bertram25 This task is yours, please go ahead keeping in mind this. If any questions, don't hesitate to ask right here. 30 mins is the budget of the task. This is exactly how much will be paid when the problem is solved (no matter how much time you will actually spend). See this for more information

@davvd
Copy link

davvd commented May 9, 2015

@dmzaytsev thanks for reporting! I topped your account for 15 mins, transaction 56895756

@davvd
Copy link

davvd commented May 16, 2015

@davvd we're waiting for #291 here

@yegor256 yes, waiting for #291

@davvd
Copy link

davvd commented May 18, 2015

@louzar This task is yours, please go ahead keeping in mind this. If any questions, don't hesitate to ask right here; Budget here is 30 mins (keep this principle in mind)

@davvd
Copy link

davvd commented May 23, 2015

@Komaz please go ahead with this task, it's yours

@davvd davvd added the @komaz label May 23, 2015
@iinozemtsev
Copy link
Contributor

@davvd waiting for #291

@davvd
Copy link

davvd commented May 25, 2015

@davvd waiting for #291

@Komaz OK, let's wait for #291

@iinozemtsev
Copy link
Contributor

@dmzaytsev is it ok that this issue is not unassigned?

@dmzaytsev
Copy link
Contributor Author

@Komaz I see the @komaz tag here
It means you assigned to this ticket

@iinozemtsev
Copy link
Contributor

@dmzaytsev yeah, but this issue is blocked by #291, I thought such issues should be unassigned to avoid penalty, e.g. yegor256/netbout#602

@dmzaytsev
Copy link
Contributor Author

@Komaz yegor256/netbout#602 is postponed

but @davvd wrote to you above

@Komaz OK, let's wait for #291

You shouldn't be fined, I hope :)

Anyway @yegor256 and @davvd to manage this project
Ask them if you not sure

@yegor256
Copy link
Owner

yegor256 commented Jun 1, 2015

@Komaz yes, everything is fine here, we're blocked by #291

@Bertram25
Copy link
Contributor

@Komaz FYI, issue #291 is now closed.
Best regards,

@davvd
Copy link

davvd commented Jun 2, 2015

@dmzaytsev I think we can continue, impediment #291 is closed

@dmzaytsev
Copy link
Contributor Author

@Komaz FYI

@dmzaytsev I think we can continue, impediment #291 is closed

@iinozemtsev
Copy link
Contributor

@dmzaytsev fixed in #329

@dmzaytsev
Copy link
Contributor Author

@Komaz thanks!

@davvd
Copy link

davvd commented Jun 5, 2015

@ypshenychka please, let us know what do you think about this ticket, according to our QA rules

@ypshenychka
Copy link

@davvd Quality is good.

@davvd
Copy link

davvd commented Jun 6, 2015

@davvd Quality is good.

@ypshenychka thanks for the review and a good remark

@davvd
Copy link

davvd commented Jun 6, 2015

@Komaz just added 10 mins to @ypshenychka (for QA), payment ID is 58676446; Much obliged! I have added 38 mins to your account in payment "AP-5MH89111A09400627", 57 hours and 30 mins spent; the bonus for fast delivery (m=3450); added +38 to your rating, now it is equal to +458

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

9 participants