bito-code-review[bot] commented on code in PR #40870:
URL: https://github.com/apache/superset/pull/40870#discussion_r3376988350


##########
superset-embedded-sdk/src/guestTokenRefresh.ts:
##########
@@ -21,6 +21,7 @@ import { jwtDecode } from "jwt-decode";
 export const REFRESH_TIMING_BUFFER_MS = 5000 // refresh guest token early to 
avoid failed superset requests
 export const MIN_REFRESH_WAIT_MS = 10000 // avoid blasting requests as fast as 
the cpu can handle
 export const DEFAULT_TOKEN_EXP_MS = 300000 // (5 min) used only when parsing 
guest token exp fails
+export const DEFAULT_TOKEN_REFRESH_RETRY_MS = 10000 // wait before retrying a 
failed/timed-out token refresh

Review Comment:
   <div>
   
   
   <div id="suggestion">
   <div id="issue"><b>Missing test coverage for retry constant</b></div>
   <div id="fix">
   
   The new `DEFAULT_TOKEN_REFRESH_RETRY_MS` constant is not covered by unit 
tests. The existing `guestTokenRefresh.test.ts` tests 
`getGuestTokenRefreshTiming` but doesn't import or test this retry constant. 
Consider adding a test case to verify the constant value and ensure the retry 
behavior is validated.
   </div>
   
   
   </div>
   
   
   
   
   <small><i>Code Review Run #c529c4</i></small>
   </div>
   
   ---
   Should Bito avoid suggestions like this for future reviews? (<a 
href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
   - [ ] Yes, avoid them



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to