Repository: jhipster/generator-jhipster (ts)

Issue:
Angular Client fails to compile With more than one entity
<!--
- Please follow the issue template below for bug reports.
- If you have a support request rather than a bug, please use [Stack Overflow](http://stackoverflow.com/questions/tagged/jhipster) with the JHipster tag.
- For bug reports it is mandatory to run the command `jhipster info` in your project's root folder, and paste the result here.
- Tickets opened without any of these pieces of information will be **closed** without any explanation.
-->

##### **Overview of the issue**

Generating an Angular client on 6.9.0 with entities results in:
```
ERROR in src/main/webapp/app/entities/entity.module.ts:6:27 - error TS2345: Argument of type '({ path: string; loadChildren: () => Promise<any>; } | undefined)[]' is not assignable to parameter of type 'Routes'.
  Type '{ path: string; loadChildren: () => Promise<any>; } | undefined' is not assignable to type 'Route'.
    Type 'undefined' is not assignable to type 'Route'.

  6     RouterModule.forChild([
                              ~
  7       {
    ~~~~~~~
... 
 16       /* jhipster-needle-add-entity-route - JHipster will add entity modules routes here */
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 17     ]),
    ~~~~~
```

##### **Reproduce the error**

1. Generate a new Monolith app
2. Add an entity
3. Add another entity

##### **Related issues**

None that I could locate

##### **Suggest a Fix**

There is a superflous comma in the generated entity.module.ts.  It should be removed.
```
{
        path: 'something',
        loadChildren: () => import('./something/something.module').then(m => m.JhipsterSomethingModule),
      },
      , <------ This one
      {
        path: 'something-else',
        loadChildren: () => import('./something-else/something-else.module').then(m => m.JhipsterSomethingElseModule),
      },
```

##### **JHipster Version(s)**

6.9.0

##### **JHipster configuration**

<!--
To provide all information we need, you should run `jhipster info` in the project root folder, and
copy/paste the result here.
The `.yo-rc.json` file generated in the root folder is mandatory for bug reports. This will help us to replicate the scenario.
You should remove any sensitive information like the rememberMe key or the jwtSecretKey key.
---
If you have a JDL please wrap it in below structure
  <details>
  <summary>JDL definitions</summary>
  <pre>
     JDL content here
  </pre>
  </details>
-->

```
INFO! Using JHipster version installed locally in current project's node_modules
INFO! Executing jhipster:info
INFO! Options: from-cli: true
Welcome to the JHipster Information Sub-Generator

##### **JHipster Version(s)**

```
jhipster@0.0.1-SNAPSHOT /home/schindlerj/src/temp/jhipster/upstream/angular-multi-entity
└── generator-jhipster@6.9.0 

```


##### **JHipster configuration, a `.yo-rc.json` file generated in the root folder**


<details>
<summary>.yo-rc.json file</summary>
<pre>
{
  "generator-jhipster": {
    "promptValues": {
      "packageName": "com.mycompany.myapp",
      "nativeLanguage": "en"
    },
    "jhipsterVersion": "6.9.0",
    "applicationType": "monolith",
    "baseName": "jhipster",
    "packageName": "com.mycompany.myapp",
    "packageFolder": "com/mycompany/myapp",
    "serverPort": "8080",
    "authenticationType": "jwt",
    "cacheProvider": "ehcache",
    "enableHibernateCache": true,
    "websocket": false,
    "databaseType": "sql",
    "devDatabaseType": "h2Disk",
    "prodDatabaseType": "mysql",
    "searchEngine": false,
    "messageBroker": false,
    "serviceDiscoveryType": false,
    "buildTool": "maven",
    "enableSwaggerCodegen": false,
    "jwtSecretKey": "YourJWTSecretKeyWasReplacedByThisMeaninglessTextByTheJHipsterInfoCommandForObviousSecurityReasons",
    "embeddableLaunchScript": false,
    "useSass": true,
    "clientPackageManager": "npm",
    "clientFramework": "angularX",
    "clientTheme": "none",
    "clientThemeVariant": "",
    "creationTimestamp": 1589918996227,
    "testFrameworks": [],
    "jhiPrefix": "jhi",
    "entitySuffix": "",
    "dtoSuffix": "DTO",
    "otherModules": [],
    "enableTranslation": true,
    "nativeLanguage": "en",
    "languages": ["en"],
    "blueprints": [],
    "lastLiquibaseTimestamp": 1589919632000
  }
}

</pre>
</details>


##### **JDL for the Entity configuration(s) `entityName.json` files generated in the `.jhipster` directory**

<details>
<summary>JDL entity definitions</summary>

<pre>
entity Something {
  name String
}
entity SomethingElse {
  num Integer
}
relationship ManyToOne {
  SomethingElse{something(name)} to Something
}


</pre>
</details>


##### **Environment and Tools**

openjdk version "11.0.7" 2020-04-14
OpenJDK Runtime Environment 18.9 (build 11.0.7+10)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.7+10, mixed mode)

git version 2.25.4

node: v12.6.0

npm: 6.14.5

yeoman: 3.1.1

yarn: 1.22.4

Docker version 19.03.8, build afacb8b7f0

docker-compose version 1.25.4, build unknown

identical .jhipster/Something.json
identical .jhipster/SomethingElse.json
INFO! Congratulations, JHipster execution is complete!

```
##### **Browsers and Operating System**

Fedora Linux 31

-   [x] Checking this box is mandatory (this is just to show you read everything)

<!-- Love JHipster? Please consider supporting our collective:
👉  https://opencollective.com/generator-jhipster/donate -->


Pull request description:
Fix double trailing comma generation in the entity module
Closes #11824 
-   Please make sure the below checklist is followed for Pull Requests.

-   [x] [All continuous integration tests](https://github.com/jhipster/generator-jhipster/actions) are green
-   [x] Tests are added where necessary
-   [x] Documentation is added/updated where necessary
-   [x] Coding Rules & Commit Guidelines as per our [CONTRIBUTING.md document](https://github.com/jhipster/generator-jhipster/blob/master/CONTRIBUTING.md) are followed

<!--
Please also reference the issue number in a commit message to [automatically close the related Github issue](https://help.github.com/articles/closing-issues-via-commit-messages/)

Note: It is also possible to add `[skip ci]` or `[ci skip]` to your commit message to skip continuous integration tests
-->


Patch:
diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml
index 27bcee3fbf..eba1c60853 100644
--- a/.github/release-drafter.yml
+++ b/.github/release-drafter.yml
@@ -1,4 +1,4 @@
 template: |
-  ## What’s Changed
+    ## What’s Changed
 
-  $CHANGES
+    $CHANGES
diff --git a/.github/workflows/angular.yml b/.github/workflows/angular.yml
index 627c534a81..849ef1b5bc 100644
--- a/.github/workflows/angular.yml
+++ b/.github/workflows/angular.yml
@@ -33,6 +33,7 @@ env:
     JHI_SCRIPTS: ./test-integration/scripts
     NG_CLI_ANALYTICS: 'false'
     JHI_GITHUB_CI: true
+    FORCE_COLOR: 1
 jobs:
     applications:
         name: ${{ matrix.app-type }}
diff --git a/.github/workflows/react.yml b/.github/workflows/react.yml
index 97922f91ad..b0d127e3e1 100644
--- a/.github/workflows/react.yml
+++ b/.github/workflows/react.yml
@@ -33,6 +33,7 @@ env:
     JHI_SCRIPTS: ./test-integration/scripts
     NG_CLI_ANALYTICS: 'false'
     JHI_GITHUB_CI: true
+    FORCE_COLOR: 1
 jobs:
     applications:
         name: ${{ matrix.app-type }}
diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml
index 2c30bcdb18..b9fcb83d0f 100644
--- a/.github/workflows/release-drafter.yml
+++ b/.github/workflows/release-drafter.yml
@@ -1,16 +1,17 @@
 name: Release Drafter
 
 on:
-  push:
-    # branches to consider in the event; optional, defaults to all
-    branches:
-      - master
+    push:
+        # branches to consider in the event; optional, defaults to all
+        branches:
+            - master
 
 jobs:
-  update_release_draft:
-    runs-on: ubuntu-latest
-    steps:
-      # Drafts your next Release notes as Pull Requests are merged into "master"
-      - uses: release-drafter/release-drafter@v5
-        env:
-          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+    update_release_draft:
+        if: github.repository == 'jhipster/generator-jhipster'
+        runs-on: ubuntu-latest
+        steps:
+            # Drafts your next Release notes as Pull Requests are merged into "master"
+            - uses: release-drafter/release-drafter@v5
+              env:
+                  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/webflux.yml b/.github/workflows/webflux.yml
index 8ea59a85e3..75cf237e0b 100644
--- a/.github/workflows/webflux.yml
+++ b/.github/workflows/webflux.yml
@@ -33,6 +33,7 @@ env:
     JHI_SCRIPTS: ./test-integration/scripts
     NG_CLI_ANALYTICS: 'false'
     JHI_GITHUB_CI: true
+    FORCE_COLOR: 1
 jobs:
     applications:
         name: ${{ matrix.app-type }}
diff --git a/generators/client/needle-api/needle-client-angular.js b/generators/client/needle-api/needle-client-angular.js
index b22940e588..8eab8b93d0 100644
--- a/generators/client/needle-api/needle-client-angular.js
+++ b/generators/client/needle-api/needle-client-angular.js
@@ -194,17 +194,18 @@ module.exports = class extends needleClientBase {
         this.addIcon(iconName);
     }
 
-    _addRoute(route, modulePath, moduleName, needleName, filePath, prefix = ',') {
+    _addRoute(route, modulePath, moduleName, needleName, filePath) {
         const isRouteAlreadyAdded = jhipsterUtils.checkStringInFile(filePath, `path: '${route}'`, this.generator);
         if (isRouteAlreadyAdded) {
             return;
         }
         const errorMessage = `${chalk.yellow('Route ') + route + chalk.yellow(` not added to ${filePath}.\n`)}`;
-        const routingEntry = this.generator.stripMargin(`${prefix}
-            |      {
+        const routingEntry = this.generator.stripMargin(
+            `{
             |        path: '${route}',
             |        loadChildren: () => import('${modulePath}').then(m => m.${moduleName})
-            |      }`);
+            |      },`
+        );
         const rewriteFileModel = this.generateFileModel(filePath, needleName, routingEntry);
         this.addBlockContentToFile(rewriteFileModel, errorMessage);
     }
@@ -220,15 +221,12 @@ module.exports = class extends needleClientBase {
 
             if (!isSpecificEntityAlreadyGenerated) {
                 const appName = this.generator.getAngularXAppName();
-                const isAnyEntityAlreadyGenerated = jhipsterUtils.checkStringInFile(entityModulePath, 'loadChildren', this.generator);
-                const prefix = isAnyEntityAlreadyGenerated ? ',' : '';
-
                 const modulePath = `./${entityFolderName}/${entityFileName}.module`;
                 const moduleName = microServiceName
                     ? `${this.generator.upperFirstCamelCase(microServiceName)}${entityAngularName}Module`
                     : `${appName}${entityAngularName}Module`;
 
-                this._addRoute(entityUrl, modulePath, moduleName, 'jhipster-needle-add-entity-route', entityModulePath, prefix);
+                this._addRoute(entityUrl, modulePath, moduleName, 'jhipster-needle-add-entity-route', entityModulePath);
             }
         } catch (e) {
             this.generator.debug('Error:', e);
diff --git a/generators/client/templates/angular/src/main/webapp/app/admin/admin-routing.module.ts.ejs b/generators/client/templates/angular/src/main/webapp/app/admin/admin-routing.module.ts.ejs
index fa9bf92b64..a9c1f1d7e4 100644
--- a/generators/client/templates/angular/src/main/webapp/app/admin/admin-routing.module.ts.ejs
+++ b/generators/client/templates/angular/src/main/webapp/app/admin/admin-routing.module.ts.ejs
@@ -71,7 +71,7 @@ import { RouterModule } from '@angular/router';
         {
           path: 'metrics',
           loadChildren: () => import('./metrics/metrics.module').then(m => m.MetricsModule)
-        }
+        },
         /* jhipster-needle-add-admin-route - JHipster will add admin routes here */
       ]
     )
diff --git a/generators/docker-compose/files.js b/generators/docker-compose/files.js
index 9c5d285b2f..a87c3a36a9 100644
--- a/generators/docker-compose/files.js
+++ b/generators/docker-compose/files.js
@@ -60,6 +60,16 @@ function writeFiles() {
             }
         },
 
+        writeGatewayConfig() {
+            if (this.serviceDiscoveryType) {
+                this.appConfigs.forEach(appConfig => {
+                    if (appConfig.applicationType === 'gateway') {
+                        this.template('central-server-config/gateway.yml.ejs', `central-server-config/${appConfig.baseName}.yml`);
+                    }
+                });
+            }
+        },
+
         writeElkFiles() {
             if (this.monitoring !== 'elk') return;
 
diff --git a/generators/docker-compose/index.js b/generators/docker-compose/index.js
index 2fee63ff60..9eec8dd519 100644
--- a/generators/docker-compose/index.js
+++ b/generators/docker-compose/index.js
@@ -110,6 +110,13 @@ module.exports = class extends BaseDockerGenerator {
                         yamlConfig.environment.push('JHIPSTER_LOGGING_LOGSTASH_HOST=jhipster-logstash');
                         yamlConfig.environment.push('JHIPSTER_METRICS_LOGS_ENABLED=true');
                         yamlConfig.environment.push('JHIPSTER_METRICS_LOGS_REPORT_FREQUENCY=60');
+                        yamlConfig.environment.push('MANAGEMENT_METRICS_EXPORT_PROMETHEUS_ENABLED=false');
+                    }
+
+                    if (appConfig.applicationType === 'monolith' && this.monitoring === 'prometheus') {
+                        yamlConfig.environment.push('JHIPSTER_LOGGING_LOGSTASH_ENABLED=false');
+                        yamlConfig.environment.push('JHIPSTER_METRICS_LOGS_ENABLED=false');
+                        yamlConfig.environment.push('MANAGEMENT_METRICS_EXPORT_PROMETHEUS_ENABLED=true');
                     }
 
                     if (this.serviceDiscoveryType === 'eureka') {
diff --git a/generators/docker-compose/templates/central-server-config/application.yml.ejs b/generators/docker-compose/templates/central-server-config/application.yml.ejs
index 891c4716d8..b6e0844697 100644
--- a/generators/docker-compose/templates/central-server-config/application.yml.ejs
+++ b/generators/docker-compose/templates/central-server-config/application.yml.ejs
@@ -20,7 +20,7 @@
 configserver:
     name: Docker JHipster Registry
     status: Connected to <% if (serviceDiscoveryType === 'eureka') { %>the JHipster Registry<% } %><% if (serviceDiscoveryType === 'consul') { %>Consul<% } %> running in Docker
-
+   
 jhipster:
     security:
         authentication:
@@ -35,8 +35,28 @@ jhipster:
         logs: # report metrics in the logs
             enabled: true
             report-frequency: 60 # in seconds
+
+management:
+    metrics:
+        export:
+            prometheus:
+                enabled: false
 <%_ } _%>
+<%_ if (monitoring === 'prometheus') { _%>
+    logging:
+        logstash: # do not forward logs to ELK
+            enabled: false
+            host: jhipster-logstash
+    metrics:
+        logs: # do not report metrics in the logs
+            enabled: false
 
+management:
+    metrics:
+        export:
+            prometheus:
+                enabled: true
+<%_ } _%>  
 <%_ if (consoleOptions && consoleOptions.includes('zipkin') || !skipClient && gatewayType === 'traefik' && authenticationType === 'oauth2') { _%>
 spring:
     <%_ if (consoleOptions && consoleOptions.includes('zipkin')) { _%>
diff --git a/generators/docker-compose/templates/central-server-config/gateway.yml.ejs b/generators/docker-compose/templates/central-server-config/gateway.yml.ejs
new file mode 100644
index 0000000000..870c7b64b7
--- /dev/null
+++ b/generators/docker-compose/templates/central-server-config/gateway.yml.ejs
@@ -0,0 +1,4 @@
+jhipster:
+  metrics:
+    logs: # do report metrics in the logs for gateway applications
+      enabled: false
\ No newline at end of file
diff --git a/generators/entity-server/templates/src/main/resources/config/liquibase/changelog/added_entity.xml.ejs b/generators/entity-server/templates/src/main/resources/config/liquibase/changelog/added_entity.xml.ejs
index ace891db83..f85b661cb2 100644
--- a/generators/entity-server/templates/src/main/resources/config/liquibase/changelog/added_entity.xml.ejs
+++ b/generators/entity-server/templates/src/main/resources/config/liquibase/changelog/added_entity.xml.ejs
@@ -214,7 +214,7 @@
                 <%_ } _%>
             <%_ } _%>
             <%_ for (idx in relationships) {
-                    let loadColumnType = relationships[idx].otherEntityPrimaryKeyType === 'String' ? 'varchar(100)' : 'numeric';
+                    let loadColumnType = relationships[idx].otherEntityPrimaryKeyType === 'String' ? 'string' : 'numeric';
                     if (relationships[idx].relationshipValidate === true && relationships[idx].relationshipRequired
                         && (relationships[idx].relationshipType === "many-to-one"
                             || (relationships[idx].relationshipType === "one-to-one" && relationships[idx].ownerSide === true
diff --git a/generators/generator-base.js b/generators/generator-base.js
index 1d6dc2646b..8e7348d871 100644
--- a/generators/generator-base.js
+++ b/generators/generator-base.js
@@ -924,7 +924,7 @@ module.exports = class extends PrivateBase {
             let lastLiquibaseTimestamp = this.config.get('lastLiquibaseTimestamp');
             if (lastLiquibaseTimestamp) {
                 lastLiquibaseTimestamp = new Date(lastLiquibaseTimestamp);
-                if (lastLiquibaseTimestamp > now) {
+                if (lastLiquibaseTimestamp >= now) {
                     now = lastLiquibaseTimestamp;
                     now.setSeconds(now.getSeconds() + 1);
                     now.setMilliseconds(0);
diff --git a/generators/server/templates/build.gradle.ejs b/generators/server/templates/build.gradle.ejs
index c5906201f8..2526cac5b5 100644
--- a/generators/server/templates/build.gradle.ejs
+++ b/generators/server/templates/build.gradle.ejs
@@ -307,7 +307,6 @@ dependencies {
     <%_ } _%>
     implementation "com.fasterxml.jackson.core:jackson-annotations"
     implementation "com.fasterxml.jackson.core:jackson-databind"
-    implementation "com.fasterxml.jackson.module:jackson-module-afterburner"
     <%_ if (applicationType === 'gateway' && authenticationType === 'uaa') { _%>
     implementation "org.apache.httpcomponents:httpclient"
     <%_ } _%>
diff --git a/generators/server/templates/pom.xml.ejs b/generators/server/templates/pom.xml.ejs
index 705afcb215..74ad9d8dd6 100644
--- a/generators/server/templates/pom.xml.ejs
+++ b/generators/server/templates/pom.xml.ejs
@@ -245,10 +245,6 @@
             <groupId>com.fasterxml.jackson.datatype</groupId>
             <artifactId>jackson-datatype-jsr310</artifactId>
         </dependency>
-        <dependency>
-            <groupId>com.fasterxml.jackson.module</groupId>
-            <artifactId>jackson-module-afterburner</artifactId>
-        </dependency>
 <%_ if (databaseType === 'sql') { _%>
         <dependency>
             <groupId>com.h2database</groupId>
diff --git a/generators/server/templates/src/main/docker/app.yml.ejs b/generators/server/templates/src/main/docker/app.yml.ejs
index e6496b1f57..2bfb1a4869 100644
--- a/generators/server/templates/src/main/docker/app.yml.ejs
+++ b/generators/server/templates/src/main/docker/app.yml.ejs
@@ -41,6 +41,9 @@ services:
             - SPRING_DATA_MONGODB_URI=mongodb://<%= baseName.toLowerCase() %>-mongodb:27017<% if (reactive) { %>/?waitQueueMultiple=1000<% } %>
             - SPRING_DATA_MONGODB_DATABASE=<%= baseName %>
             <%_ } _%>
+            <%_ if (prodDatabaseType === 'neo4j') { _%>
+            - ORG_NEO4J_DRIVER_URI=bolt://<%= baseName.toLowerCase() %>-neo4j:7687
+            <%_ } _%>
             <%_ if (prodDatabaseType === 'couchbase') { _%>
             - SPRING_COUCHBASE_BOOTSTRAP_HOSTS=<%= baseName.toLowerCase() %>-couchbase
             - SPRING_COUCHBASE_BUCKET_NAME=<%= baseName %>
diff --git a/generators/server/templates/src/main/java/package/config/JacksonConfiguration.java.ejs b/generators/server/templates/src/main/java/package/config/JacksonConfiguration.java.ejs
index c367f057d3..259a9afe0c 100644
--- a/generators/server/templates/src/main/java/package/config/JacksonConfiguration.java.ejs
+++ b/generators/server/templates/src/main/java/package/config/JacksonConfiguration.java.ejs
@@ -23,7 +23,6 @@ import com.fasterxml.jackson.datatype.hibernate5.Hibernate5Module;
 <%_ } _%>
 import com.fasterxml.jackson.datatype.jdk8.Jdk8Module;
 import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
-import com.fasterxml.jackson.module.afterburner.AfterburnerModule;
 
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
@@ -57,14 +56,6 @@ public class JacksonConfiguration {
     }
 <%_ } _%>
 
-    /*
-     * Jackson Afterburner module to speed up serialization/deserialization.
-     */
-    @Bean
-    public AfterburnerModule afterburnerModule() {
-        return new AfterburnerModule();
-    }
-
     /*
      * Module for serialization/deserialization of RFC7807 Problem.
      */


Test patch:
diff --git a/generators/server/templates/src/test/java/package/AbstractNeo4jIT.java.ejs b/generators/server/templates/src/test/java/package/AbstractNeo4jIT.java.ejs
index 00c6346967..98ab1f9088 100644
--- a/generators/server/templates/src/test/java/package/AbstractNeo4jIT.java.ejs
+++ b/generators/server/templates/src/test/java/package/AbstractNeo4jIT.java.ejs
@@ -20,28 +20,23 @@ package <%= packageName %>;
 
 import org.junit.jupiter.api.extension.BeforeAllCallback;
 import org.junit.jupiter.api.extension.ExtensionContext;
-import org.springframework.test.context.DynamicPropertyRegistry;
-import org.springframework.test.context.DynamicPropertySource;
 import org.testcontainers.containers.Neo4jContainer;
 
 import java.util.concurrent.atomic.AtomicBoolean;
 
-
 public class AbstractNeo4jIT implements BeforeAllCallback {
 
     private static AtomicBoolean started = new AtomicBoolean(false);
 
     private static Neo4jContainer neo4jContainer = new Neo4jContainer("<%= DOCKER_NEO4J %>").withoutAuthentication();
 
-    @DynamicPropertySource
-    static void neo4jProperties(DynamicPropertyRegistry registry) {
-        registry.add("org.neo4j.driver.uri", () -> neo4jContainer.getBoltUrl());
-    }
-
-    @Override
-    public void beforeAll(ExtensionContext extensionContext) throws Exception {
+    public void beforeAll(ExtensionContext extensionContext) {
         if (!started.get()) {
             neo4jContainer.start();
+            System.setProperty(
+                "org.neo4j.driver.uri",
+                neo4jContainer.getBoltUrl()
+            );
             started.set(true);
         }
     }
diff --git a/test/generator-base.spec.js b/test/generator-base.spec.js
index 57522e676c..65a06d739d 100644
--- a/test/generator-base.spec.js
+++ b/test/generator-base.spec.js
@@ -433,21 +433,20 @@ describe('Generator Base', () => {
                 let firstChangelogDate;
                 let secondChangelogDate;
                 beforeEach(() => {
-                    base.options.creationTimestamp = '2000-01-01';
-                    const lastLiquibaseTimestamp = new Date(Date.parse('2030-01-01'));
-                    base.config.set('lastLiquibaseTimestamp', lastLiquibaseTimestamp.getTime());
                     firstChangelogDate = base.dateFormatForLiquibase(false);
                     secondChangelogDate = base.dateFormatForLiquibase(false);
                 });
                 it('should return a valid changelog date', () => {
                     expect(/^\d{14}$/.test(firstChangelogDate)).to.be.true;
+                    expect(/^\d{14}$/.test(secondChangelogDate)).to.be.true;
                 });
                 it('should return a reproducible changelog date incremental to lastLiquibaseTimestamp', () => {
-                    expect(firstChangelogDate).to.be.equal('20300101000001');
-                    expect(secondChangelogDate).to.be.equal('20300101000002');
+                    expect(firstChangelogDate).to.not.be.equal(secondChangelogDate);
                 });
                 it('should save lastLiquibaseTimestamp', () => {
-                    expect(base.config.get('lastLiquibaseTimestamp')).to.be.equal(parseLiquibaseChangelogDate('20300101000002').getTime());
+                    expect(base.config.get('lastLiquibaseTimestamp')).to.be.equal(
+                        parseLiquibaseChangelogDate(secondChangelogDate).getTime()
+                    );
                 });
             });
             describe('with a past creationTimestamp option', () => {
diff --git a/test/needle-api/needle-client-angular.spec.js b/test/needle-api/needle-client-angular.spec.js
index df8397b330..9356513407 100644
--- a/test/needle-api/needle-client-angular.spec.js
+++ b/test/needle-api/needle-client-angular.spec.js
@@ -195,11 +195,11 @@ describe('needle API Angular: JHipster client generator with blueprint', () => {
     it('admin module contains the routing added by needle api', () => {
         assert.fileContent(
             `${CLIENT_MAIN_SRC_DIR}app/admin/admin-routing.module.ts`,
-            ',\n' +
-                '      {\n' +
+            '        },\n' +
+                '        {\n' +
                 "        path: 'entity-audit',\n" +
                 "        loadChildren: () => import('./entity-audit/entity-audit.module').then(m => m.EntityAuditModule)\n" +
-                '      }'
+                '      },'
         );
     });