質問

私は奇妙なフレックスユニットエラーに直面しています:

おっと...別の完全なものを送るように頼まれました、そして私はすでにそれをしました

テストの数が27を超えたときにエラーが発生しているようです...? (テストは完了しません)

テストの例:

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

任意のヘルプを歓迎します!

これが例です:

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);
    }
}

結果:

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
役に立ちましたか?

解決

皮肉なことに、実際の問題は実際にはスタックフローであることを考えると、これがここに投稿されています。

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

バグに記載されている回避策を使用できます。または、この動作はFlexUnit 4.1ベータで修正されています。

4.1のリリースバージョンはまもなく登場します。

問題は、フレームワークが次のフレームまで待つように強制される前に、マシンが1つの追加テストを受けるのに十分な速さであることです。フラッシュプレーヤーは、スタックの深さが深くなり、不適切な場所でトライキャッチに巻き込まれ、その後「おっと」ステートメントを追跡すると、スタックオーバーフローを投げます。

FlexUnit 4.xでは元々、このためにカウンターとおおよそのフレーム長を使用しました。これは、テストよりも多くの機械にリンクされている非常にまれに、これを可能にする可能性があります。 4.1では、この問題を永久に排除するはずのフレームを実際に監視します。

マイク

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top