Skip to content

Conversation

@robingrandval
Copy link
Contributor

…ison (between timestamp in ms and sec)

Issue #647

@Aschen
Copy link
Contributor

Aschen commented Jul 7, 2021

Hi @robingrandval and thanks for your contribution :-)

Can you add an unit test testing the expired getter when the JWT is not expired to ensure this bug will not reappear in the futur? https://github.com/kuzzleio/sdk-javascript/blob/master/test/core/Jwt.test.js#L42

@Aschen Aschen changed the title [Fix] core/Jwt expired getter return always true due to wrong compara… Fix the Jwt.expired getter wrong comparison of micro timestamp and timestamp Jul 7, 2021
@Aschen Aschen changed the base branch from master to 7-dev July 7, 2021 06:27
@robingrandval
Copy link
Contributor Author

Hi @Aschen, it's done.

@codecov
Copy link

codecov bot commented Jul 7, 2021

Codecov Report

Merging #648 (34feeff) into 7-dev (68a346e) will increase coverage by 0.56%.
The diff coverage is 100.00%.

❗ Current head 34feeff differs from pull request most recent head 8d6d2c4. Consider uploading reports for the commit 8d6d2c4 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##            7-dev     #648      +/-   ##
==========================================
+ Coverage   85.62%   86.19%   +0.56%     
==========================================
  Files          36       36              
  Lines        1635     1637       +2     
  Branches      297      297              
==========================================
+ Hits         1400     1411      +11     
+ Misses        175      169       -6     
+ Partials       60       57       -3     
Impacted Files Coverage Δ
src/core/searchResult/SearchResultBase.ts 77.58% <ø> (ø)
src/Kuzzle.ts 86.21% <100.00%> (+3.30%) ⬆️
src/core/Jwt.js 96.15% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 68a346e...8d6d2c4. Read the comment docs.

@Aschen Aschen merged commit b3044e1 into kuzzleio:7-dev Jul 7, 2021
@Aschen Aschen mentioned this pull request Jul 21, 2021
Aschen added a commit that referenced this pull request Jul 21, 2021
# [7.7.2](https://github.com/kuzzleio/sdk-javascript/releases/tag/7.7.2) (2021-07-21)


#### Bug fixes

- [ [#651](#651) ] Hotfix heartbeat race condition   ([Shiranuit](https://github.com/Shiranuit))
- [ [#648](#648) ] Fix the Jwt.expired getter wrong comparison of micro timestamp and timestamp   ([robingrandval](https://github.com/robingrandval))
- [ [#646](#646) ] Fix usage of SearchResult.next with HTTP   ([Aschen](https://github.com/Aschen))
- [ [#644](#644) ] Correctly reject aborted queued requests   ([scottinet](https://github.com/scottinet))

#### Enhancements

- [ [#650](#650) ] Add authenticator function used at reconnection   ([Aschen](https://github.com/Aschen))
---
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

core/Jwt expired getter return always true due to wrong comparaison (between timestamp in ms and sec)

3 participants