google-code-export / gwt-test-utils

Automatically exported from code.google.com/p/gwt-test-utils
1 stars 0 forks source link

RepeatingCommand executed through scheduleIncremental() only executes first iteration #127

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Try this:

    private void retreiveAndPopulateView() {

        Scheduler.get().scheduleIncremental(new RepeatingCommand() {
            private int index = 0;
            protected final int COUNT = 2;

            @Override
            public boolean execute() {
                if(index == 0) {
                    System.out.println("index:"+index);
                } else if (index==1) {
                    System.out.println("index:"+index);
                } else if (index==2) {
                    System.out.println("index:"+index);
                }
                this.index++;
                return index <= this.COUNT;
            }
        });
    }

What is the expected output? What do you see instead?
This should print:
index:0
index:1
index:2
instead, I only see index:0
What version of the product are you using? On what operating system?
0.35 on Windows

Please provide any additional information below.

Original issue reported on code.google.com by bike2l...@gmail.com on 20 Mar 2012 at 10:52

GoogleCodeExporter commented 9 years ago

Original comment by gael.laz...@gmail.com on 21 Mar 2012 at 10:54

GoogleCodeExporter commented 9 years ago

Original comment by gael.laz...@gmail.com on 21 Mar 2012 at 10:55

GoogleCodeExporter commented 9 years ago
I've just deployed a new 0.36-SNAPSHOT version with a fix for this.

Could you please give it a try and post some feedback here so I could close 
this issue ? Thanks !

Original comment by gael.laz...@gmail.com on 21 Mar 2012 at 11:12

GoogleCodeExporter commented 9 years ago
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Compiling 230 source files to 
C:\dev\devapps\gwt-test-utils-read-only\gwt-test-utils\target\classes
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure
C:\dev\devapps\gwt-test-utils-read-only\gwt-test-utils\src\main\java\com\octo\gw
t\test\uibinder\UiBinderInstanciator.java:[44,27] type param
eters of <T>T cannot be determined; no unique maximal instance exists for type 
variable T with upper bounds U,java.lang.Object

Original comment by bike2l...@gmail.com on 21 Mar 2012 at 8:58

GoogleCodeExporter commented 9 years ago
Never mind I got past the UiBinderInstanciator problem.  I'm still working on 
verifying your fix, thanks!

Original comment by bike2l...@gmail.com on 21 Mar 2012 at 9:27

GoogleCodeExporter commented 9 years ago
I built 0.36-SNAPSHOT but it didn't work. I had to change line 44 of 
UiBinderInstanciator.java from
      instance = GWT.create(clazz);
to this:
      instance = GWT.<U>create(clazz);
but that probably didn't cause the failure I'm guessing. Could you have 
fogotten to commit a file? Maybe I built something wrong? Some of the test 
cases didn't pass, I noticed. Can you publish a 0.36 to the Downloads page for 
me to try?

Thanks for your help. This will make a big difference in our codebase and I 
want to recommend its adoption to the whole team and make it a habit for us.

Here are pass/failed tests:
Failed tests:
  specialChars(com.octo.gwt.test.i18n.MyConstantsTest)
  numberFormat_Fr(com.octo.gwt.test.i18n.NumberFormatTest)
  specialChars(com.octo.gwt.test.i18n.MyConstantsWithLookupTest)
  html_withSpecialChars(com.octo.gwt.test.HTMLTest)
  a_message(com.octo.gwt.test.i18n.MyMessagesTest)
  totalAmount(com.octo.gwt.test.i18n.MyMessagesTest)

Tests run: 596, Failures: 6, Errors: 0, Skipped: 0

Original comment by bike2l...@gmail.com on 22 Mar 2012 at 4:09

GoogleCodeExporter commented 9 years ago
I fixed the UiBinderInstanciator compilation problem and commited some other 
files I was working on and deployed another 0.36-SNAPSHOT which can be 
downloaded manually from here 
:http://forge.octo.com/nexus/content/repositories/snapshots/com/octo/gwt/test/gw
t-test-utils/0.36-SNAPSHOT/ (take the lastest : 
gwt-test-utils-0.36-20120322.063103-38.jar)

I'm not sure yet why you have i18n test failure, but will try to do a mvn clean 
install on some Windows environnement today. Taking the compiled jar should 
solve the problem.

I can't release a 0.36 version yet since I'm still working on some others 
issues and am waiting for some feedback to closes some others.
A new release is planned next week ;)

Original comment by gael.laz...@gmail.com on 22 Mar 2012 at 6:41

GoogleCodeExporter commented 9 years ago
Thank you, my repeating command works now.

Original comment by bike2l...@gmail.com on 23 Mar 2012 at 2:34

GoogleCodeExporter commented 9 years ago
great, thanks :)

Original comment by gael.laz...@gmail.com on 23 Mar 2012 at 2:36