Skip to content

Adapt Http2SettingsSpecTests to new netty error messages #2795

Merged
pderop merged 1 commit intoreactor:1.0.xfrom
pderop:1.0.x-adapt-http2settingsspectests-to-netty-13369
May 4, 2023
Merged

Adapt Http2SettingsSpecTests to new netty error messages #2795
pderop merged 1 commit intoreactor:1.0.xfrom
pderop:1.0.x-adapt-http2settingsspectests-to-netty-13369

Conversation

@pderop
Copy link
Copy Markdown
Contributor

@pderop pderop commented May 4, 2023

We need to adapt the Http2SettingsSpecTests, because since Netty PR#13369, the messages of the IllegalArgumentExceptions thrown when invalid Http2Settings are used have changed, and the following tests in the reactor-netty Http2SettingsSpecTests test are not passing anymore:

headerTableSizeBadValues
Expecting message to be:
  "Setting HEADER_TABLE_SIZE is invalid: -1"
but was:
  "Setting HEADER_TABLE_SIZE is invalid: -1, expected [0, 4294967295]"


maxFrameSizeBadValues
Expecting message to be:
  "Setting MAX_FRAME_SIZE is invalid: -1"
but was:
  "Setting MAX_FRAME_SIZE is invalid: -1, expected [16384, 16777215]"

maxHeaderListSizeBadValues
Expecting message to be:
  "Setting MAX_HEADER_LIST_SIZE is invalid: -1"
but was:
  "Setting MAX_HEADER_LIST_SIZE is invalid: -1, expected [0, 4294967295]"

initialWindowSizeBadValues
Expecting message to be:
  "Setting INITIAL_WINDOW_SIZE is invalid: -1"
but was:
  "Setting INITIAL_WINDOW_SIZE is invalid: -1, expected [0, 2147483647]"

maxConcurrentStreamsBadValues
Expecting message to be:
  "Setting MAX_CONCURRENT_STREAMS is invalid: -1"
but was:
  "Setting MAX_CONCURRENT_STREAMS is invalid: -1, expected [0, 4294967295]"

Since the Netty PR is only available in 4.1.93.Final-SNAPSHOT, let's compare the exceptions messages using withMessageContaining instead of withMessage, this will ensure that the test passes with current netty 4.1.92.Final as well as with 4.1.93.Final-SNAPSHOT.

@pderop pderop added the type/test A general test label May 4, 2023
@pderop pderop added this to the 1.0.32 milestone May 4, 2023
@pderop pderop self-assigned this May 4, 2023
@pderop
Copy link
Copy Markdown
Contributor Author

pderop commented May 4, 2023

@violetagg , thanks for the review.

@pderop pderop merged commit 6cc779a into reactor:1.0.x May 4, 2023
pderop added a commit that referenced this pull request May 4, 2023
pderop added a commit that referenced this pull request May 4, 2023
@violetagg violetagg changed the title Adapt Http2SettingsSpecTests to new netty error messages Adapt Http2SettingsSpecTests to new netty error messages May 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/test A general test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants