CXuesong / WikiClientLibrary

/*🌻*/ Wiki Client Library is an asynchronous MediaWiki API client library targeting modern .NET platforms
https://github.com/CXuesong/WikiClientLibrary/wiki
Apache License 2.0
82 stars 16 forks source link

Migrate unit tests to xUnit #11

Closed CXuesong closed 7 years ago

CXuesong commented 7 years ago

… which enables some real asynchronous test methods.

CXuesong commented 7 years ago

Migration is nearly complete. However, the concurrent execution of unit tests exposed some inconsistency problem, especially, assertion fails in Site.LoginAsync.

The absence of Assert.Inconclusive is also a little bit troublesome…

CXuesong commented 7 years ago

A strange behavior revealed!

I have two WikiClients, A & B. Login to the endpoint X with A, login to the endpoint X with B, and logout from X with B; then we will surprisingly find out we've been logged out from X with A!

It might be MW's security precaution… Anyway, I'm trying to confirm this on Phabricator.

CXuesong commented 7 years ago

It's already confirmed in T51890.

It seems that I'm the latest victim. Hooray 😂

CXuesong commented 7 years ago

Thus, for now the unit tests are asynchronous yet serial. Anyway the migration is done.