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

Test suite started to fail (with Test2::Suite 0.000121?) #1

Closed
eserte opened this issue May 14, 2019 · 3 comments
Closed

Test suite started to fail (with Test2::Suite 0.000121?) #1

eserte opened this issue May 14, 2019 · 3 comments

Comments

@eserte
Copy link

eserte commented May 14, 2019

The tests started to fail. Beginning of test log:

    # Failed test at t/01_basic.t line 47.
    # +---------------+-----+---------------+----+---------------+--------+
    # | PATH          | LNs | GOT           | OP | CHECK         | LNs    |
    # +---------------+-----+---------------+----+---------------+--------+
    # |               |     | ARRAY(0x426a2 |    | <ARRAY>       | 33, 39 |
    # |               |     | d38)          |    |               |        |
    # |               |     |               |    |               |        |
    # | [0]           | 28  | Test2::Event: |    | <EVENT: Ok>   | 34     |
    # |               |     | :Fail=HASH(0x |    |               |        |
    # |               |     | 43b6e120)     |    |               |        |
    # |               |     |               |    |               |        |
    # | [0] <blessed> |     | Test2::Event: | eq | Test2::Event: |        |
    # |               |     | :Fail         |    | :Ok           |        |
    # |               |     |               |    |               |        |
    # | [0]{pass}     |     | <DOES NOT EXI |    | 0             |        |
    # |               |     | ST>           |    |               |        |
    # |               |     |               |    |               |        |
    # | [1]           |     | <DOES NOT EXI |    | <EVENT: Diag> | 35     |
    # |               |     | ST>           |    |               |        |
    # |               |     |               |    |               |        |
    # | [2]           |     | <DOES NOT EXI |    | <EVENT: Diag> | 38     |
    # |               |     | ST>           |    |               |        |
    # +---------------+-----+---------------+----+---------------+--------+

# Failed test 'JSON cmp failure (expect raw hash)'
# at t/01_basic.t line 48.
... (etc) ...

Statistical analysis suggests that the failure started with Test2::Suite 0.000121 (@exodist: FYI):

****************************************************************
Regression 'mod:Test2::Suite'
****************************************************************
Name           	       Theta	      StdErr	 T-stat
[0='const']    	      1.0000	      0.0000	16611328747973736.00
[1='eq_0.000097']	     -0.0000	      0.0000	  -0.92
[2='eq_0.000100']	      0.0000	      0.0000	   0.80
[3='eq_0.000111']	     -0.0000	      0.0000	  -0.84
[4='eq_0.000114']	     -0.0000	      0.0000	  -1.74
[5='eq_0.000115']	     -0.0000	      0.0000	  -1.30
[6='eq_0.000116']	      0.0000	      0.0000	   0.00
[7='eq_0.000119']	      0.0000	      0.0000	   0.00
[8='eq_0.000120']	     -0.0000	      0.0000	  -2.61
[9='eq_0.000121']	     -1.0000	      0.0000	-16115356002295272.00

R^2= 1.000, N= 111, K= 10
****************************************************************
@exodist
Copy link

exodist commented May 15, 2019

I introduced a new 'Fail' event that combines the failed assertion and the diagnostics into a single event, some Test2::Suite tools were switched to use it. These tests will need to be updated to support the new events.

I am thinking about how to avoid these kinds of issues in the future, I am thinking a test-testing tool that does not pay attention to the event types, but rather just pays attention to their effect. But you should not wait for that before updating your tests.

Sorry for the inconvenience.

@akiym akiym closed this as completed in 8c4d080 Aug 7, 2019
akiym added a commit that referenced this issue Aug 7, 2019
Changelog diff is:

diff --git a/Changes b/Changes
index ebfc75a..2d986c6 100644
--- a/Changes
+++ b/Changes
@@ -2,6 +2,12 @@ Revision history for Perl extension Test2-Tools-JSON

 {{$NEXT}}

+0.04 2019-08-07T10:01:59Z
+
+    - fix broken tests in new version of Test2 (fix #1)
+    - pass $seen from params
+    - add Test2::V0 deps
+
 0.03 2018-01-30T09:03:58Z

     - same behavior of JSON::decode_json
@eserte
Copy link
Author

eserte commented Aug 7, 2019

With 0.04 it looks like this:

****************************************************************
Regression 'mod:Test2::Suite'
****************************************************************
Name           	       Theta	      StdErr	 T-stat
[0='const']    	      0.0000	      0.0000	   0.00
[1='eq_0.000114']	      0.0000	      0.0000	   6.08
[2='eq_0.000115']	      0.0000	      0.0000	   7.02
[3='eq_0.000116']	      0.0000	      0.0000	  14.05
[4='eq_0.000117']	      0.0000	      0.0000	  12.17
[5='eq_0.000118']	      0.0000	      0.0000	   0.00
[6='eq_0.000119']	      0.0000	      0.0000	  12.17
[7='eq_0.000121']	      1.0000	      0.0000	54788654129668552.00
[8='eq_0.000122']	      1.0000	      0.0000	76428620070309264.00

R^2= 1.000, N= 46, K= 9
****************************************************************

That is, it passes if Test2::Suite 0.000121 or 0.000122 is installed, and fails with older versions.

akiym added a commit that referenced this issue Aug 7, 2019
Changelog diff is:

diff --git a/Changes b/Changes
index 2d986c6..4b66685 100644
--- a/Changes
+++ b/Changes
@@ -2,6 +2,10 @@ Revision history for Perl extension Test2-Tools-JSON

 {{$NEXT}}

+0.05 2019-08-07T21:52:49Z
+
+    - fix broken tests again
+
 0.04 2019-08-07T10:01:59Z

     - fix broken tests in new version of Test2 (fix #1)
@akiym
Copy link
Owner

akiym commented Aug 7, 2019

@eserte Thank you. I've released these fixes with 0.05.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants