aurora-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David McLaughlin <da...@dmclaughlin.com>
Subject Re: Review Request 63436: Enabling ErrorBoundary in Scheduler UI
Date Wed, 08 Nov 2017 00:02:39 GMT


> On Nov. 8, 2017, 12:02 a.m., David McLaughlin wrote:
> > @ReviewBot retry

Ran into this when trying to commit to master:

PASS src/main/js/components/__tests__/StateMachine-test.js
FAIL src/main/js/components/__tests__/ErrorBoundary-test.js
  ? ErrorBoundary › Should show the error message when catches an exception

    expect(received).toBe(expected)
    
    Expected value to be (using ===):
      true
    Received:
      false
      
      at Object.<anonymous> (src/main/js/components/__tests__/ErrorBoundary-test.js:20:93)
      at process._tickCallback (internal/process/next_tick.js:103:7)

Summary of all failing tests
FAIL src/main/js/components/__tests__/ErrorBoundary-test.js
  ? ErrorBoundary › Should show the error message when catches an exception

    expect(received).toBe(expected)
    
    Expected value to be (using ===):
      true
    Received:
      false
      
      at Object.<anonymous> (src/main/js/components/__tests__/ErrorBoundary-test.js:20:93)
      at process._tickCallback (internal/process/next_tick.js:103:7)


Test Suites: 1 failed, 31 passed, 32 total


- David


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/63436/#review190392
-----------------------------------------------------------


On Oct. 31, 2017, 8:15 p.m., Reza Motamedi wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/63436/
> -----------------------------------------------------------
> 
> (Updated Oct. 31, 2017, 8:15 p.m.)
> 
> 
> Review request for Aurora, David McLaughlin, Joshua Cohen, and Kai Huang.
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> # Enabling ErrorBoundary in Scheduler UI
> React 16 introduces a new concept of an “error boundary” that allows us to limit
the impact of an error and not unmount the whole component tree. I am open to keeping or removing
the stack trace.
> 
> from React docs:
> > As of React 16, errors that were not caught by any error boundary will result in
unmounting of the whole React component tree.
> 
> 
> Diffs
> -----
> 
>   ui/.eslintrc 5cdc4e67030a79c3f81c06f585cc9ff5ce959e52 
>   ui/src/main/js/components/ErrorBoundary.js PRE-CREATION 
>   ui/src/main/js/components/__tests__/ErrorBoundary-test.js PRE-CREATION 
>   ui/src/main/js/index.js 9f94d4bd6f649d74bdd9c3aa99783e01cae25d93 
> 
> 
> Diff: https://reviews.apache.org/r/63436/diff/2/
> 
> 
> Testing
> -------
> 
> - Unit tests added.
> 
> ```
> # rmotamedi@tw-mbp-rmotamedi:~/oss/aurora on git:error-boundry-test ? [13:06:52]
> ? ./gradlew ui:test
> 
> BUILD SUCCESSFUL in 0s
> 2 actionable tasks: 2 up-to-date
> 
> # rmotamedi@tw-mbp-rmotamedi:~/oss/aurora on git:error-boundry-test ? [13:07:46]
> ? ./gradlew ui:lint
> 
> BUILD SUCCESSFUL in 5s
> 4 actionable tasks: 4 up-to-date
> ```
> 
> 
> - For more testing, I added the following component (that raises an error) and installed
it under different components. I attached the screen-shots of how this will render. Clicking
the link initializes the process of Jira ticket creation.
> 
> ## ComponentWithError
> 
> ```
> import React from 'react'
> 
> export default class ComponentWithError extends React.Component {
>   render() {
>     throw new Error('Crashed!');
>     return <div />;
>   }
> }
> ```
> 
> 
> File Attachments
> ----------------
> 
> Apache Jira ticket template filled with information on the bug
>   https://reviews.apache.org/media/uploaded/files/2017/10/31/0b50175f-0dd5-44fe-8bc4-c69ca1723729__Screen_Shot_2017-10-31_at_11.55.39_AM.png
> Catching exceptions on the router
>   https://reviews.apache.org/media/uploaded/files/2017/10/31/915182ef-4229-4b22-b7c6-20a5f24f8e1a__Screen_Shot_2017-10-31_at_11.44.56_AM.png
> 
> 
> Thanks,
> 
> Reza Motamedi
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message