Skip to content

Conversation

@vicky-g
Copy link
Contributor

@vicky-g vicky-g commented Oct 28, 2021

Description

Tests

happy path:

// 20211028164337
// http://cn1_creator-node_1:4001/health_check/ipfs?timeout=10000

{
  "data": {
    "hash": "QmdJGCb6tjsJwpjwjjf9EmD4oZjvcSSE4KS1fxAmQTCPwY",
    "duration": "86ms"
  },
  "signer": "0x8c755b082dbc874d362ec5c3366cabcd9440bee8",
  "timestamp": "2021-10-28T23:43:37.001Z",
  "signature": "0xc385c2cd1b0b5d4a72c6fb8cef75205ece39a7279f036b80427bc2dee3ddd73d476dfa10d11dcf8868ada68706f92a2ced5cfb78b71f6d25853fd6e694047dd71c"
}

testing low timeout threshold:

// 20211028164245
// http://cn1_creator-node_1:4001/health_check/ipfs?timeout=1

{
  "error": {
    "error": "IPFS took over the specified timeout of 1ms. Time taken 86ms"
  }
}

testing bad query string:
1.

// 20211028164547
// http://cn1_creator-node_1:4001/health_check/ipfs?timeout=agewafewf

{
  "data": {
    "q": "agewafewf",
    "qs": null,   // what parseInt() evaluates timeout query string to
    "actualTimeout": 10000,
    "hash": "QmWbxAv26FeBvE5ZwfrDaaQAg2A7bHoXRTojrzekLUbavb",
    "duration": "106ms"
  },
  "signer": "0x8c755b082dbc874d362ec5c3366cabcd9440bee8",
  "timestamp": "2021-10-28T23:45:46.965Z",
  "signature": "0xdf68008b20c9f48dd1accbd9e82e0c4844ddfa5418b48acd8250b6d5d8554f9c6147271d0eb014a64bbed71d23fa21d14c81c11708a82849448c1b5f4631c4301b"
}
// 20211028164605
// http://cn1_creator-node_1:4001/health_check/ipfs?timeout=m,,,222$4

{
  "data": {
    "q": "m,,,222$4",
    "qs": null,   // what parseInt() evaluates timeout query string to
    "actualTimeout": 10000,
    "hash": "QmWbxAv26FeBvE5ZwfrDaaQAg2A7bHoXRTojrzekLUbavb",
    "duration": "106ms"
  },
  "signer": "0x8c755b082dbc874d362ec5c3366cabcd9440bee8",
  "timestamp": "2021-10-28T23:46:05.063Z",
  "signature": "0xcd18465cf00ef5009903f5acdc83e2a08ad700b12e388584cfc368f70ebf17953e322289031ae7cc20ef590828c1a3196bd474e9e165761f2095e1889a4a88671b"
}

How will this change be monitored?

@vicky-g vicky-g marked this pull request as ready for review October 28, 2021 23:54
@vicky-g vicky-g merged commit e88f5ea into master Oct 29, 2021
@vicky-g vicky-g deleted the vg-add-qs-timeout-ipfs-hc branch October 29, 2021 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants