TypeScript Test Runner ops-error

I am hitting ops errors with the TypeScript test-runner but I don’t know how I can get more information on what it means. What I am worried about to begin with is that it seems to run about 3x slower than on Github Actions (which is already a resource contrained environment) – takes ~7 seconds to do a full run on GitHub Actions Docker run.

The output is for example:

{
  "test_run": {
    "uuid": "6b7172f7-1968-4835-98c8-433f064f54b7",
    "submission_uuid": "4b56737fad034741962d2ed09584c990",
    "version": 3,
    "status": "ops_error",
    "message": "An unknown error occurred",
    "message_html": "An unknown error occurred",
    "output": null,
    "output_html": null,
    "tests": [
      {
        "name": "EXPECTED_MINUTES_IN_OVEN > constant is defined correctly",
        "status": "pass",
        "test_code": "expect(EXPECTED_MINUTES_IN_OVEN).toBe(40)",
        "message": "",
        "message_html": "",
        "expected": null,
        "output": null,
        "output_html": null,
        "task_id": 1
      },
      {
        "name": "remainingMinutesInOven > calculates the remaining time",
        "status": "pass",
        "test_code": "expect(remainingMinutesInOven(25)).toBe(15)\nexpect(remainingMinutesInOven(5)).toBe(35)\nexpect(remainingMinutesInOven(39)).toBe(1)",
        "message": "",
        "message_html": "",
        "expected": null,
        "output": null,
        "output_html": null,
        "task_id": 2
      },
      {
        "name": "remainingMinutesInOven > works correctly for the edge cases",
        "status": "pass",
        "test_code": "expect(remainingMinutesInOven(40)).toBe(0)\nexpect(remainingMinutesInOven(0)).toBe(40)",
        "message": "",
        "message_html": "",
        "expected": null,
        "output": null,
        "output_html": null,
        "task_id": 2
      },
      {
        "name": "preparationTimeInMinutes > calculates the preparation time",
        "status": "pass",
        "test_code": "expect(preparationTimeInMinutes(1)).toBe(2)\nexpect(preparationTimeInMinutes(2)).toBe(4)\nexpect(preparationTimeInMinutes(8)).toBe(16)",
        "message": "",
        "message_html": "",
        "expected": null,
        "output": null,
        "output_html": null,
        "task_id": 3
      },
      {
        "name": "totalTimeInMinutes > calculates the total cooking time",
        "status": "pass",
        "test_code": "expect(totalTimeInMinutes(1, 5)).toBe(7)\nexpect(totalTimeInMinutes(4, 15)).toBe(23)\nexpect(totalTimeInMinutes(1, 30)).toBe(32)",
        "message": "",
        "message_html": "",
        "expected": null,
        "output": null,
        "output_html": null,
        "task_id": 4
      }
    ],
    "tasks": [
      {
        "id": 1,
        "title": "Define the expected oven time in minutes"
      },
      {
        "id": 2,
        "title": "Calculate the remaining oven time in minutes"
      },
      {
        "id": 3,
        "title": "Calculate the preparation time in minutes"
      },
      {
        "id": 4,
        "title": "Calculate the total working time in minutes"
      }
    ],
    "highlightjs_language": "typescript",
    "links": {
      "self": "https://exercism.org/api/v2/solutions/966c60de62dc45d3baf23fa6e63b3d3a/submissions/4b56737fad034741962d2ed09584c990/test_run"
    }
  },
  "test_runner": {
    "average_test_duration": 9,
    "status": {
      "exercise": true,
      "track": true
    }
  }
}

Which looks like it ran to completion (without timeout) as otherwise it would not have the tests listed there?

Here is an example that failed without tests:

https://exercism.org/api/v2/solutions/966c60de62dc45d3baf23fa6e63b3d3a/submissions/c109be2300bd4f71aefb8cffb47c480c/test_run

{
"test_run": {
"uuid": "9ee1d3bf-1dcb-4aa6-80c5-5943c178de03",
"submission_uuid": "c109be2300bd4f71aefb8cffb47c480c",
"version": 0,
"status": "ops_error",
"message": "An unknown error occurred",
"message_html": "An unknown error occurred",
"output": null,
"output_html": null,
"tests": [],
"tasks": [],
"highlightjs_language": "typescript",
"links": {
"self": "https://exercism.org/api/v2/solutions/966c60de62dc45d3baf23fa6e63b3d3a/submissions/c109be2300bd4f71aefb8cffb47c480c/test_run"
}
},
"test_runner": {
"average_test_duration": 9,
"status": {
"exercise": true,
"track": true
}
}
}

Note that this is the same code as the other response, just a comment less.

So i re-ran a few times, and then at some point it passed:

https://exercism.org/api/v2/solutions/966c60de62dc45d3baf23fa6e63b3d3a/submissions/b14d34fdf63c431b98494e96bc279e27/test_run

{
"test_run": {
"uuid": "93108993-d2aa-4aa2-89f1-ef3ba5d202eb",
"submission_uuid": "b14d34fdf63c431b98494e96bc279e27",
"version": 3,
"status": "pass",
"message": null,
"message_html": null,
"output": null,
"output_html": null,
"tests": [
{
"name": "EXPECTED_MINUTES_IN_OVEN > constant is defined correctly",
"status": "pass",
"test_code": "expect(EXPECTED_MINUTES_IN_OVEN).toBe(40)",
"message": "",
"message_html": "",
"expected": null,
"output": null,
"output_html": null,
"task_id": 1
},
{
"name": "remainingMinutesInOven > calculates the remaining time",
"status": "pass",
"test_code": "expect(remainingMinutesInOven(25)).toBe(15)\nexpect(remainingMinutesInOven(5)).toBe(35)\nexpect(remainingMinutesInOven(39)).toBe(1)",
"message": "",
"message_html": "",
"expected": null,
"output": null,
"output_html": null,
"task_id": 2
},
{
"name": "remainingMinutesInOven > works correctly for the edge cases",
"status": "pass",
"test_code": "expect(remainingMinutesInOven(40)).toBe(0)\nexpect(remainingMinutesInOven(0)).toBe(40)",
"message": "",
"message_html": "",
"expected": null,
"output": null,
"output_html": null,
"task_id": 2
},
{
"name": "preparationTimeInMinutes > calculates the preparation time",
"status": "pass",
"test_code": "expect(preparationTimeInMinutes(1)).toBe(2)\nexpect(preparationTimeInMinutes(2)).toBe(4)\nexpect(preparationTimeInMinutes(8)).toBe(16)",
"message": "",
"message_html": "",
"expected": null,
"output": null,
"output_html": null,
"task_id": 3
},
{
"name": "totalTimeInMinutes > calculates the total cooking time",
"status": "pass",
"test_code": "expect(totalTimeInMinutes(1, 5)).toBe(7)\nexpect(totalTimeInMinutes(4, 15)).toBe(23)\nexpect(totalTimeInMinutes(1, 30)).toBe(32)",
"message": "",
"message_html": "",
"expected": null,
"output": null,
"output_html": null,
"task_id": 4
}
],
"tasks": [
{
"id": 1,
"title": "Define the expected oven time in minutes"
},
{
"id": 2,
"title": "Calculate the remaining oven time in minutes"
},
{
"id": 3,
"title": "Calculate the preparation time in minutes"
},
{
"id": 4,
"title": "Calculate the total working time in minutes"
}
],
"highlightjs_language": "typescript",
"links": {
"self": "https://exercism.org/api/v2/solutions/966c60de62dc45d3baf23fa6e63b3d3a/submissions/b14d34fdf63c431b98494e96bc279e27/test_run"
}
},
"test_runner": {
"average_test_duration": 9,
"status": {
"exercise": true,
"track": true
}
}
}

I am still hitting this.

cc @iHiD @ErikSchierboom

Sorry, missed this. Is this for all typescript exercises? The problem is that it’s constantly slow to the point that sometimes it times out (and slower than on GH Actions?) but with some variance between ~9s and timeout?

1 Like

This seems to happen with high occurence on the concept exercise which does more than the other exercises. I have not tested enough to see if it sometimes happens on other exercises. My tests indicate that it only happens on the concept exercise.

It never shows the timeout message. It always shows unknown error.