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

Some ses-ava static test methods don't work #647

Closed
erights opened this issue Mar 29, 2021 · 21 comments
Closed

Some ses-ava static test methods don't work #647

erights opened this issue Mar 29, 2021 · 21 comments
Assignees
Labels
kriskowal-review-2024-01 Issues that kriskowal wants to bring to the attention of the team for review as of January, 2024

Comments

@erights
Copy link
Contributor

erights commented Mar 29, 2021

Changing test-message-pattern.js to use ses-ava causes the test.serial at
https://github.com/Agoric/agoric-sdk/blob/201cd2d4ed41a41bb9b751a714f99fcd3f6bb303/packages/SwingSet/test/test-message-patterns.js#L123

to fail at
https://github.com/Agoric/agoric-sdk/pull/2740/checks?check_run_id=2211691217#step:7:220

  Uncaught exception in test/test-message-patterns.js

  test/test-message-patterns.js:123

   122:   }                                                     
   123:   test.serial('local patterns', testLocalPattern, name);
   124: }                                                       

  Error: Duplicate test title: local patterns
@erights
Copy link
Contributor Author

erights commented Mar 29, 2021

@erights erights changed the title ses-ava test.repeat fails with "Duplicate test title" Some ses-ava static test methods fails with "Duplicate test title" Mar 29, 2021
@erights erights changed the title Some ses-ava static test methods fails with "Duplicate test title" Some ses-ava static test methods don't work Mar 29, 2021
@erights erights changed the title Some ses-ava static test methods don't work Some ses-ava static test methods don't work Mar 29, 2021
@erights
Copy link
Contributor Author

erights commented Mar 29, 2021

I'm listing methods in this issue as I encounter them in trying to switch to ses-ava.
If it is easier to fix our code to not use these methods then it is to get ses-ava to virtualize these correctly, feel free. I'd rather define ses-ava to implement a sensible subset of the ava API if possible.

@FUDCo
Copy link
Contributor

FUDCo commented Mar 29, 2021

I'm very confused. First, there's no test.repeat there. Second, my change to ses-ava last week makes this work. Something has gotten tangled up in the plumbing somewhere.

@erights
Copy link
Contributor Author

erights commented Mar 29, 2021

Doh! I remembered the wrong name. test.serial is the problem. I revised the first message in this thread to correct that.

@FUDCo
Copy link
Contributor

FUDCo commented Mar 29, 2021

OK, that takes care of my first point, but why did this work correctly for me the other day? The change I made to ses-ava should (did!) fix this.

@erights
Copy link
Contributor Author

erights commented Mar 29, 2021

It seems to be only those two uses of test.serial. Several others do fine with ses-ava. Some others have not yet been tried with ses-ava.

@FUDCo
Copy link
Contributor

FUDCo commented Mar 29, 2021

That specific test file (test-message-patterns.js) was the thing I was going on about wanting to run under ses-ava and after my changes to ses-ava to support the Ava "macro" facilitiy, it worked. So if it doesn't work now, something else you did changed something to make it not work. I'm trying to figure out what that might have been.

@erights
Copy link
Contributor Author

erights commented Mar 29, 2021

The left pane of

https://github.com/Agoric/agoric-sdk/pull/2740/files#diff-8845f7584737c882a225a4b88eee42f5064626370ad4b222d3e0319fd6e4cb68

shows that it was previously (prior to this PR at least) using ava, not ses-ava. When was it using ses-ava ?

@FUDCo
Copy link
Contributor

FUDCo commented Mar 29, 2021

To use it with ses-ava I had to checkout your SES 12.5 update branch and manually patch the test. I put the test back the way it was before committing the SwingSet changes I was testing, because at the time checking in the version of the test that used ses-ava would break CI; I was waiting for the SES 12.5 changes, as well as my changes to ses-ava itself, to land so I could put the test back in a state to use ses-ava, but the latter changes are essentially what you have now done here. So the mystery is why it doesn't now work, since it worked before. The diff you linked to is the diff to test-message-patterns.js, but that's not what I was asking about. I was asking what you'd changed in ses-ava to cause it to stop working in this case.

@erights
Copy link
Contributor Author

erights commented Mar 29, 2021

https://github.com/Agoric/dapp-token-economy/pull/154/files
is the only change to ses-ava since your "macro" change.
See https://github.com/endojs/endo/commits/master/packages/ses-ava
Nothing there but updating dependency on ses to 0.12.6 and one irrelevant test change.

@FUDCo
Copy link
Contributor

FUDCo commented Mar 29, 2021

OK, I think I figured it out. It looks like the changes to ses-ava haven't been released. The version that a yarn install installs predates my fix.

@FUDCo
Copy link
Contributor

FUDCo commented Feb 3, 2022

Let's revisit this. I think it can be closed.

@erights
Copy link
Contributor Author

erights commented Feb 3, 2022

Close as in "it's already fixed, let's close the bug" or "let's fix this"?

@FUDCo
Copy link
Contributor

FUDCo commented Feb 3, 2022

In this case, I think "already fixed"

@erights
Copy link
Contributor Author

erights commented Feb 3, 2022

Looks like the bug report was provoked by test-message-pattern.js breaking when we tried switching it to ses-ava. If the underlying issue is fixed, can we now switch test-message-pattern.js to ses-ava? Can we make that switch as part of closing this bug?

@erights
Copy link
Contributor Author

erights commented Feb 3, 2022

Looks like we've got over 180 imports of 'ava' rather than 'ses-ava', most of which I expect should be switched if these are no longer problems.

Again, not an MN-1 issue. But definitely a real problem!

@erights
Copy link
Contributor Author

erights commented Dec 24, 2022

@turadg added you as you're interesting in such improvements. Should this one be closed as a dup?

@turadg
Copy link
Member

turadg commented Dec 24, 2022

I closed the other one since this describes a more general problem.

@kriskowal kriskowal added the kriskowal-review-2024-01 Issues that kriskowal wants to bring to the attention of the team for review as of January, 2024 label Jan 10, 2024
@erights
Copy link
Contributor Author

erights commented Mar 1, 2024

@turadg , can we close this as fixed by your Agoric/agoric-sdk#5774 ? Is there any remaining reason it needs to stay open?

@erights
Copy link
Contributor Author

erights commented Mar 3, 2024

Hi @turadg , I think this is fixed, so I'm closing. Please reopen if I'm missing something. Thanks.

@erights erights closed this as completed Mar 3, 2024
@turadg
Copy link
Member

turadg commented Mar 4, 2024

That was an SDK PR but I can confirm this is fixed in Endo now too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kriskowal-review-2024-01 Issues that kriskowal wants to bring to the attention of the team for review as of January, 2024
Projects
None yet
Development

No branches or pull requests

4 participants