constellation-load-testing / constellation-local

Constellation's CLI and infrastructure
0 stars 0 forks source link

LG Errors - Master Issue #44

Open neebs12 opened 2 years ago

neebs12 commented 2 years ago

Ran in to this problem:

Image

...but all tests ran normally...

Image

This is the test script I was running (this is an IP of my DO droplet).

const sleep = async (ms) => {
  return new Promise((resolve) => {
    setTimeout(resolve, ms);
  });
};

export const script = async (axiosInstance) => {
  await axiosInstance.post("http://170.64.152.161", {
    timeStamp: Date.now(),
  });
  await sleep(500);
  await axiosInstance.get("http://170.64.152.161");
  await sleep(500);
};

This is the config file with it

{
  "DURATION": 20000,
  "HOME_REGION": "us-east-1",
  "REMOTE_REGIONS": {
    "ap-northeast-1": 1001,
    "us-east-2": 2001,
    "us-west-1": 3001,
    "ap-south-1": 1000,
    "sa-east-1": 100,
    "ap-northeast-2": 3000
  }
}

But when running with mockbin urls:

"use strict";

const sleep = async (ms) => {
  return new Promise((resolve) => {
    setTimeout(resolve, ms);
  });
};

export const script = async (axiosInstance) => {
  await axiosInstance.post(
    "https://mockbin.org/bin/19b03afc-cdb8-4ddd-b545-840f10851db0",
    {
      timeStamp: Date.now(),
    }
  );
  await sleep(500);
  await axiosInstance.get(
    "https://mockbin.org/bin/19b03afc-cdb8-4ddd-b545-840f10851db0"
  );
  await sleep(500);
};

it seems to work fine:

Image

neebs12 commented 2 years ago

Yup just confirmed that it was just because of the url change: When I switched back to the url: http://170.64.152.161, im getting the same errors

Image

Even when switched with: http://jaricheta.com (via DNS), it still throws an error. Actually, I think the DO droplet rejected it for a little bit because I got a 502 error when trying to visit the site during a load test

Image