Domanda

Sono di fronte a uno strano errore FlexUnit:

  

Whoa ... è stato chiesto di inviare un altro   completo e ho già fatto

L'errore sembra verificarsi quando il numero di test di exceede 27 ...? (I test mai completa)

Test Esempio:

[Test]
public function whenDoingThat_expectThatIsTrue():void{
      //blabla      
      assertTrue(...)
}

Qualsiasi aiuto benvenuto!

Ecco un Esempio:

core = new FlexUnitCore();
core.addListener(new TraceListener());
core.run(FooTest);


import org.flexunit.asserts.assertTrue;

public class FooTest {
    [Test]
    public function foo_test_1() : void {
        assertTrue(true);
    }
    [Test]
    public function foo_test_2() : void {
        assertTrue(true);
    }

    ...

    [Test]
    public function foo_test_28() : void {
        assertTrue(true);
    }
    //[Test]
    public function foo_test_29() : void {
        assertTrue(true);
    }
}

Risultati:

foo_test_9 .
foo_test_17 .
foo_test_3 .
foo_test_18 .
foo_test_4 .
foo_test_19 .
foo_test_5 .
foo_test_6 .
foo_test_20 .
foo_test_21 .
foo_test_7 .
foo_test_22 .
foo_test_8 .
foo_test_23 .
foo_test_2 .
foo_test_24 .
foo_test_10 .
foo_test_25 .
foo_test_11 .
foo_test_26 .
foo_test_12 .
foo_test_27 .
foo_test_13 .
foo_test_28 .
foo_test_14 .
foo_test_15 .
foo_test_1 .
foo_test_16 .
Whoa... been asked to send another complete and I already did that
È stato utile?

Soluzione

Ironico questo è pubblicato qui, considerando il problema reale è davvero uno StackOverflow:

https://bugs.adobe.com/jira/browse/FXU-112

È possibile utilizzare la soluzione di cui il bug, o questo comportamento è stato risolto nel FlexUnit 4.1 Beta, che si trova nella pagina di flexunit.org download.

Una versione di 4.1 è in arrivo molto presto.

Il problema è che la macchina è sufficientemente veloce per ottenere un test in più in prima che le forze quadro e attendere fino al fotogramma successivo. Flash Player genera un overflow dello stack quando quella profondità dello stack arriva a profondità e viene catturato in un tentativo di cattura in un luogo inopportuno, e successivamente tracciare l'affermazione 'Whoa'.

In FlexUnit 4.x originariamente, abbiamo usato un contatore e una lunghezza approssimativa cornice per questo che, in rare occasioni più legato alla macchina di test, potrebbe consentire a questo scopo. In 4.1 abbiamo effettivamente monitorare i fotogrammi come vanno con la quale dovrebbe eliminare definitivamente questo problema.

Mike

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top