Uploaded image for project: 'Camunda Optimize'
  1. Camunda Optimize
  2. OPT-5868

Incomplete Mocking requires checks in production code

    • Icon: Bug Report Bug Report
    • Resolution: Unresolved
    • Icon: L3 - Default L3 - Default
    • None
    • None
    • backend
    • None
    • S

      During tests of the importing process we mock several objects to simulate real world conditions. These mockings however are missing some information, and in order for the tests to not fail, checks are required in the production code, for cases that would in reality never happen.

      Steps to reproduce:

      1) Exclude the check of whether the configurationService is null in the method readExcludedIdsFromConfig() from BackoffImportMediator.java and/or remove the catch (OptimizeConfigurationException) in that method

      2) Run our build pipeline

      3) Notice that tests fail, checking for a case that would never happen in reality (configurationService is null or the engine coinfigured in the ImportIndexHandler doesn't exist in the config)

      Solution:

      The mocked entities should be closer to real life objects that the code may encounter

        This is the controller panel for Smart Panels app

            [OPT-5868] Incomplete Mocking requires checks in production code

            This ticket was migrated to github: https://github.com/camunda/camunda-optimize/issues/10644. Please use this link for any future references and continue any discussion there.

            Omran Abazeed added a comment - This ticket was migrated to github: https://github.com/camunda/camunda-optimize/issues/10644 . Please use this link for any future references and continue any discussion there.

              Unassigned Unassigned
              giuliano.rodrigues-lima Giuliano Rodrigues Lima
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: