Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test disappear from test explorer UI when changing status #447

Open
5 tasks done
jhuels opened this issue Sep 17, 2024 · 1 comment
Open
5 tasks done

Test disappear from test explorer UI when changing status #447

jhuels opened this issue Sep 17, 2024 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@jhuels
Copy link

jhuels commented Sep 17, 2024

Checklist

  • The issue is about this extension and NOT about a fork.
  • Checked the ALL the SUPPORT document.
  • The latest version of the extension was used.
  • It is not related to remote-vscode or I checked the following issue
  • Imagine yourself into my position and think how hard to debug the issue without insufficient information.
    I understand that you have privacy concerns and I expect you to understand that this extension is developed for free.
    Thanks.

Describe the bug

When a test changes status it sometimes disappears from the test explorer UI. I notice this more when going from fail -> pass, but sometimes get this when going from fail/success -> not run.

This can also happen to groupings of tests.

To Reproduce

  1. Create a failing test
  2. Update to make the test pass
  3. Re-run by clicking Run in the test explorer UI
  4. Test disappears from the tree, all other tests from that grouping remain

Screenshots (optional)

Desktop

Name: C++ TestMate
Id: matepek.vscode-catch2-test-adapter
Description: Run GoogleTest, Catch2 and DOCtest tests from VSCode
Version: 4.12.0
Publisher: Mate Pek
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=matepek.vscode-catch2-test-adapter

  • Extension Version: 4.12.0
  • VS Code Version: 1.92.2
  • Catch2 / Google Test / DOCTest Version: gtest 1.14.0 (commit sha 89b2557)
  • OS Type and Version: RHEL 9.4 (kernel 5.14.0-427.31.1.el9_4.x86_64)
  • Using remote-ssh/docker/wsl?: No, native desktop

Regression bug?

I don't think so, I've noticed this for a long time.

  • Last extension version in which the feature were working: Unsure
**Log** (optional but recommended)
[2024-09-17 18:07:44.785] [INFO] proc starting /home/jhuels/path/to/test [
  '--gtest_color=no',
  '--gtest_filter=TestSuite.TestName',
  '--gtest_also_run_disabled_tests'
] /home/jhuels/path/to/test
[2024-09-17 18:07:44.792] [INFO] proc started 214564 /home/jhuels/path/to/test {
  shared: {
    workspaceFolder: {
      uri: f {
        scheme: 'file',
        authority: '',
        path: '/home/jhuels/path/to/code',
        query: '',
        fragment: '',
        _formatted: 'file:///home/jhuels/path/to/code',
        _fsPath: '/home/jhuels/path/to/code'
      },
      name: 'project_name',
      index: 0
    },
    log: {
      _logger: {
        configSection: 'testMate.cpp.log',
        workspaceFolder: undefined,
        outputChannelName: 'C++ TestMate',
        inspectOptions: [Object],
        includeLocation: false,
        targets: [Array],
        nextInspectOptions: undefined,
        configChangeSubscription: [Object]
      }
    },
    testController: {
      controller: {
        items: [Object],
        label: [Getter/Setter],
        refreshHandler: [Getter/Setter],
        id: [Getter],
        relatedCodeProvider: [Getter/Setter],
        createRunProfile: [Function: createRunProfile],
        createTestItem: [Function: createTestItem],
        createTestRun: [Function: createTestRun],
        invalidateTestResults: [Function: invalidateTestResults],
        resolveHandler: [Getter/Setter],
        dispose: [Function: dispose]
      },
      testItem2test: WeakMap { <items unknown> }
    },
    executeTask: [Function (anonymous)],
    sendRetireEvent: [Function: d],
    varToValue: [
      {
        resolve: /\$\{workspaceFolder(?:\[(?:(-?[0-9]+)|(-?[0-9]+)?:(-?[0-9]+)?)\])?\}/,
        rule: [Function: rule]
      },
      {
        resolve: /\$\{workspaceDirectory(?:\[(?:(-?[0-9]+)|(-?[0-9]+)?:(-?[0-9]+)?)\])?\}/,
        rule: [Function: rule]
      },
      { resolve: '${workspaceName}', rule: 'project_name' },
      { resolve: /\$\{assert(?::([^}]+))?\}/, rule: [Function: rule] },
      { resolve: '${osPathSep}', rule: '/' },
      { resolve: '${osPathEnvSep}', rule: ':' },
      { resolve: /\$\{config:([^}]+)\}/, rule: [Function: rule] },
      { resolve: /\$\{command:([^}]+)\}/, rule: [AsyncFunction: rule] }
    ],
    rngSeed: null,
    execWatchTimeout: 10000,
    _execRunningTimeout: 600000,
    execParsingTimeout: 5000,
    isNoThrow: false,
    enabledTestListCaching: false,
    enabledStrictPattern: null,
    googleTestTreatGMockWarningAs: 'nothing',
    googleTestGMockVerbose: 'default',
    hideUninterestingOutput: true,
    _execRunningTimeoutChangeEmitter: n {
      z: 0,
      f: undefined,
      g: undefined,
      j: undefined,
      w: undefined,
      q: [Function (anonymous)],
      u: undefined
    },
    _cancellationTokenSource: O { f: R { a: false, b: null }, g: undefined },
    cancellationToken: R { a: false, b: null },
    onDidChangeExecRunningTimeout: [Function (anonymous)],
    taskPool: { _maxTaskCount: 1, _runningTaskCount: 1, _waitingTasks: [] },
    buildProcessChecker: {
      _log: { _logger: [Object] },
      _checkIntervalMillis: 2000,
      _defaultPattern: /(^|[/\\])(bazel|cmake|make|ninja|cl|c\+\+|ld|clang|clang\+\+|gcc|g\+\+|link|icc|armcc|armclang)(-[^/\\]+)?(\.exe)?$/,
      _lastChecked: 1726596463056,
      _finishedP: Promise { undefined },
      _finishedResolver: [Function (anonymous)],
      _timerId: undefined
    }
  },
  name: 'Debug - ${baseFilename}',
  description: undefined,
  varToValue: [
    { resolve: '${filename}', rule: 'panel_tests' },
    { resolve: '${relDirpath}', rule: 'build-gcc-debug/bin' },
    {
      resolve: /\$\{filename(?:\[(?:(-?[0-9]+)|(-?[0-9]+)?:(-?[0-9]+)?)\])?\}/,
      rule: [Function: rule]
    },
    {
      resolve: /\$\{relPath(?:\[(?:(-?[0-9]+)|(-?[0-9]+)?:(-?[0-9]+)?)\])?\}/,
      rule: [Function: rule]
    },
    {
      resolve: /\$\{absPath(?:\[(?:(-?[0-9]+)|(-?[0-9]+)?:(-?[0-9]+)?)\])?\}/,
      rule: [Function: rule]
    },
    {
      resolve: /\$\{relDirpath(?:\[(?:(-?[0-9]+)|(-?[0-9]+)?:(-?[0-9]+)?)\])?\}/,
      rule: [Function: rule]
    },
    {
      resolve: /\$\{absDirpath(?:\[(?:(-?[0-9]+)|(-?[0-9]+)?:(-?[0-9]+)?)\])?\}/,
      rule: [Function: rule]
    },
    { resolve: '${extFilename}', rule: '' },
    { resolve: '${baseFilename}', rule: 'panel_tests' },
    {
      resolve: /\$\{workspaceFolder(?:\[(?:(-?[0-9]+)|(-?[0-9]+)?:(-?[0-9]+)?)\])?\}/,
      rule: [Function: rule]
    },
    {
      resolve: /\$\{workspaceDirectory(?:\[(?:(-?[0-9]+)|(-?[0-9]+)?:(-?[0-9]+)?)\])?\}/,
      rule: [Function: rule]
    },
    { resolve: '${workspaceName}', rule: 'project_name' },
    { resolve: /\$\{assert(?::([^}]+))?\}/, rule: [Function: rule] },
    { resolve: '${osPathSep}', rule: '/' },
    { resolve: '${osPathEnvSep}', rule: ':' },
    { resolve: /\$\{config:([^}]+)\}/, rule: [Function: rule] },
    { resolve: /\$\{command:([^}]+)\}/, rule: [AsyncFunction: rule] },
    {
      resolve: /\$\{cwd(?:\[(?:(-?[0-9]+)|(-?[0-9]+)?:(-?[0-9]+)?)\])?\}/,
      rule: [Function: rule]
    }
  ],
  path: '/home/jhuels/path/to/test',
  options: {
    cwd: '/home/jhuels/path/to/code/build-gcc-debug/bin',
    env: {
      <redacted>
    }
  },
  _frameworkSpecific: { testGrouping: undefined },
  markAsSkipped: false,
  executableCloning: false,
  debugConfigData: undefined,
  runTask: { before: [], beforeEach: [], after: [], afterEach: [] },
  spawner: s {},
  resolvedSourceFileMap: {},
  log: {
    _logger: {
      configSection: 'testMate.cpp.log',
      workspaceFolder: undefined,
      outputChannelName: 'C++ TestMate',
      inspectOptions: { depth: 3 },
      includeLocation: false,
      targets: [ [c] ],
      nextInspectOptions: undefined,
      configChangeSubscription: { dispose: [Function (anonymous)] }
    }
  },
  workspaceFolder: {
    uri: f {
      scheme: 'file',
      authority: '',
      path: '/home/jhuels/path/to/code',
      query: '',
      fragment: '',
      _formatted: 'file:///home/jhuels/path/to/code',
      _fsPath: '/home/jhuels/path/to/code'
    },
    name: 'project_name',
    index: 0
  },
  workspacePath: '/home/jhuels/path/to/code',
  testController: {
    controller: {
      items: {
        size: [Getter],
        forEach: [Function: forEach],
        replace: [Function: replace],
        add: [Function: add],
        delete: [Function: delete],
        get: [Function: get],
        toJSON: [Function: toJSON],
        [Symbol(Symbol.iterator)]: [Function: [Symbol.iterator]]
      },
      label: [Getter/Setter],
      refreshHandler: [Getter/Setter],
      id: [Getter],
      relatedCodeProvider: [Getter/Setter],
      createRunProfile: [Function: createRunProfile],
      createTestItem: [Function: createTestItem],
      createTestRun: [Function: createTestRun],
      invalidateTestResults: [Function: invalidateTestResults],
      resolveHandler: [Getter/Setter],
      dispose: [Function: dispose]
    },
    testItem2test: WeakMap { <items unknown> }
  },
  cancellationToken: R { a: false, b: null },
  taskPool: { _maxTaskCount: 1, _runningTaskCount: 1, _waitingTasks: [] },
  executeTask: [Function (anonymous)],
  parallelizationPool: { _maxTaskCount: 1, _runningTaskCount: 1, _waitingTasks: [] },
  optionsHash: '5104f6'
} [
  '--gtest_color=no',
  '--gtest_filter=TestSuite.TestName',
  '--gtest_also_run_disabled_tests'
];
[2024-09-17 18:07:44.973] [INFO] TestCase not found in children TestSuite.TestName
[2024-09-17 18:07:44.973] [INFO] testGrouping {
  testId: 'TestName',
  resolvedFile: undefined,
  tags: [ 'TestSuite' ],
  testGrouping: {
    groupByExecutable: {
      label: 'Debug - ${baseFilename}',
      description: undefined,
      groupByTags: { tags: [], tagFormat: '${tag}' }
    }
  }
}
[2024-09-17 18:07:44.975] [INFO] Test TestSuite.TestName has started.
[2024-09-17 18:07:44.979] [INFO] Test TestSuite.TestName has stopped.
[2024-09-17 18:07:45.002] [INFO] proc close: /home/jhuels/path/to/test [ 0, null ]
[2024-09-17 18:07:45.003] [INFO] proc finished: /home/jhuels/path/to/test
[2024-09-17 18:07:45.003] [ERROR] reloading-error:  [Error: spawn ETXTBSY
	at ChildProcess.spawn (node:internal/child_process:421:11)
	at Object.spawn (node:child_process:799:9)
	at e.spawn (/home/jhuels/.vscode/extensions/matepek.vscode-catch2-test-adapter-4.12.0/out/dist/main.js:2:390694)
	at s.spawn (/home/jhuels/.vscode/extensions/matepek.vscode-catch2-test-adapter-4.12.0/out/dist/main.js:2:301622)
	at f._reloadChildren (/home/jhuels/.vscode/extensions/matepek.vscode-catch2-test-adapter-4.12.0/out/dist/main.js:2:366258)
	at async /home/jhuels/.vscode/extensions/matepek.vscode-catch2-test-adapter-4.12.0/out/dist/main.js:2:331596
	at async e.ConfigOfExecGroup._recursiveHandleRunnable (/home/jhuels/.vscode/extensions/matepek.vscode-catch2-test-adapter-4.12.0/out/dist/main.js:2:280257)] {
  errno: -26,
  code: 'ETXTBSY',
  syscall: 'spawn'
}
[2024-09-17 18:07:45.056] [INFO] Checking running build related processes /(^|[/\\])(bazel|cmake|make|ninja|cl|c\+\+|ld|clang|clang\+\+|gcc|g\+\+|link|icc|armcc|armclang)(-[^/\\]+)?(\.exe)?$/
[2024-09-17 18:07:45.078] [INFO] Not found running build related process
[2024-09-17 18:07:47.079] [INFO] Checking running build related processes /(^|[/\\])(bazel|cmake|make|ninja|cl|c\+\+|ld|clang|clang\+\+|gcc|g\+\+|link|icc|armcc|armclang)(-[^/\\]+)?(\.exe)?$/
[2024-09-17 18:07:47.107] [INFO] Not found running build related process
[2024-09-17 18:07:47.107] [INFO] refresh timed out: /home/jhuels/path/to/test

I might forget to mention that PLEASE attach an EXTENSIVE log. A lot of times reportes just select what they think it is important and those logs sometime not sufficient.

Sorry these tests are in an export controlled system so I have to manually redact them. If you need more please let me know.

@matepek
Copy link
Owner

matepek commented Oct 19, 2024

Hello,
I was not able to reproduce with setting:

    "testMate.cpp.test.advancedExecutables": [
        {
            "pattern":"./build/gtest1.exe",
            "testGrouping": {
                "testId": "TestName",
                "tags": [ "TestSuite" ],
                "testGrouping": {
                  "groupByExecutable": {
                    "label": "Debug - ${baseFilename}",
                    "groupByTags": { "tags": [], "tagFormat": "${tag}" }
                  }
                }
              }
        },

@matepek matepek added the help wanted Extra attention is needed label Oct 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants