Skip to content

Commit 8f91265

Browse files
authored
Merge pull request #644 from naver/release/3.5.1-p1
Release 3.5.1-p1 Reviewed by : geunwoo
2 parents d744dbe + bc49567 commit 8f91265

File tree

13 files changed

+170
-59
lines changed

13 files changed

+170
-59
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
* nGrinder 3.5.1 has been released. See https://github.com/naver/ngrinder/releases
1+
* nGrinder 3.5.1-p1 has been released. See https://github.com/naver/ngrinder/releases
22

33
nGrinder
44
========

RELEASE-NOTE.md

+42-35
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,66 @@
1+
3.5.1-p1 (2020.09.01)
2+
==================
3+
- Changes
4+
* Add additional groovy dependencies.
5+
- json, xml, sql, datetime, templates.
6+
* Change webpack default profile.
7+
18
3.5.1 (2020.08.31)
29
==================
3-
* Changes
10+
- Changes
411
* Support Java 11.
5-
* nGrinder now supports Java 11. Controller & Agent supports Java 1.8 or above.
6-
* Bump several libraries version up.
12+
- nGrinder now supports Java 11. Controller & Agent supports Java 1.8 or above.
13+
- Bump several libraries version up.
714

8-
* Trivial Fix
15+
- Trivial Fix
916
* Remove mobile phone column from NUSER table.
1017
* Make several UI improvements.
1118

1219
3.5.0 (2020.07.30)
1320
==================
14-
* New Feature
21+
- New Feature
1522
* Introduce server mode agent
16-
* In previous version, nGrinder agents made TCP connections from agent to controller and this made hard to locate a nGrinder controller behind a firewall. From version 3.5.0, nGrinder introduces server mode agent so that a controller make a connection from a controller to agents.
17-
* See https://github.com/naver/ngrinder/wiki/server-mode-agent
23+
- In previous version, nGrinder agents made TCP connections from agent to controller and this made hard to locate a nGrinder controller behind a firewall. From version 3.5.0, nGrinder introduces server mode agent so that a controller make a connection from a controller to agents.
24+
- See https://github.com/naver/ngrinder/wiki/server-mode-agent
1825
* Update agents automatically
19-
* When the test is executed with older version of agent, it triggers agent auto update.
26+
- When the test is executed with older version of agent, it triggers agent auto update.
2027
* Support GitHub script storage
21-
* Users can save and run their test script saved in not only embedded SVN server but also external GitHub repository. GitHub enterprise deployed in each own organization is also supported.
22-
* See https://github.com/naver/ngrinder/wiki/github-script-storage
28+
- Users can save and run their test script saved in not only embedded SVN server but also external GitHub repository. GitHub enterprise deployed in each own organization is also supported.
29+
- See https://github.com/naver/ngrinder/wiki/github-script-storage
2330
* Support MySQL
24-
* Since 3.5.0, we support H2 and MySQL as databases and fade out Cubrid and provide cubrid-to-mysql migration script.
25-
* See https://github.com/naver/ngrinder/wiki/mysql-migration
31+
- Since 3.5.0, we support H2 and MySQL as databases and fade out Cubrid and provide cubrid-to-mysql migration script.
32+
- See https://github.com/naver/ngrinder/wiki/mysql-migration
2633
* Improve test restart time
27-
* In previous version, nGrinder agent doesn't cache executed test lib & resources, Therefore, it took long time to execute tests in the case of using large amount of libraries and resource. From nGrinder 3.5.0, the test execution is much faster by sending only changed test resources to agents
34+
- In previous version, nGrinder agent doesn't cache executed test lib & resources, Therefore, it took long time to execute tests in the case of using large amount of libraries and resource. From nGrinder 3.5.0, the test execution is much faster by sending only changed test resources to agents
2835
* Fade out nGrinder-recorder
29-
* nGrinder-recorder is no longer supported.
36+
- nGrinder-recorder is no longer supported.
3037
* Support multiple user defined statistics
31-
* See https://github.com/naver/ngrinder/wiki/multiple-user-defined-statistic-in-ngrinder
38+
- See https://github.com/naver/ngrinder/wiki/multiple-user-defined-statistic-in-ngrinder
3239
* Ignore error count
33-
* Some of users want to continue testing even if there were many errors in the test. So nGrinder 3.5.0 supports that as a test option in advanced configuration panel
40+
- Some of users want to continue testing even if there were many errors in the test. So nGrinder 3.5.0 supports that as a test option in advanced configuration panel
3441
* Support custom classpath
35-
* If you want to set classpath for test scripts, you can use this.
36-
* See https://github.com/naver/ngrinder/wiki/custom-classpath
42+
- If you want to set classpath for test scripts, you can use this.
43+
- See https://github.com/naver/ngrinder/wiki/custom-classpath
3744

38-
* Modernize
45+
- Modernize
3946
* Back-end
40-
* Spring boot
41-
* Change from spring framework 4 to spring boot 2.
42-
* Remove embedded Jetty.
43-
* Hazelcast
44-
* Use Hazelcast to share data among clusters
45-
* Reduce load of database.
46-
* Gradle
47-
* Use Gradle 6.3 as a build system.
47+
- Spring boot
48+
- Change from spring framework 4 to spring boot 2.
49+
- Remove embedded Jetty.
50+
- Hazelcast
51+
- Use Hazelcast to share data among clusters
52+
- Reduce load of database.
53+
- Gradle
54+
- Use Gradle 6.3 as a build system.
4855
* Front-end
49-
* Vue.js
50-
* Introduce SPA for imporve responsibility & usability.
51-
* Use webpack as a module bundler.
52-
* UX/UI
53-
* Use Billboard.js to draw charts.
54-
* Bump bootstrap up from 2 to 4.
55-
56-
* Bug fix
56+
- Vue.js
57+
- Introduce SPA for imporve responsibility & usability.
58+
- Use webpack as a module bundler.
59+
- UX/UI
60+
- Use Billboard.js to draw charts.
61+
- Bump bootstrap up from 2 to 4.
62+
63+
- Bug fix
5764
* #490 Fix log file name for agent command line
5865
* #558 Fix agent state API to work in private agent
5966
* #571 Prevent zombie agents from remaining in distributed cache

build.gradle

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ allprojects {
22
apply plugin: "idea"
33

44
group = "org.ngrinder"
5-
version = "3.5.1"
5+
version = "3.5.1-p1"
66

77
idea {
88
module {
@@ -29,7 +29,7 @@ subprojects {
2929
targetCompatibility = 1.8
3030

3131
ext {
32-
profile = project.hasProperty('profile') ? profile : 'development'
32+
profile = project.hasProperty('profile') ? profile : 'production'
3333
slf4j_version = "1.7.28"
3434
spring_security_version = "5.3.4.RELEASE"
3535
spring_boot_version = "2.3.3.RELEASE"
@@ -39,6 +39,7 @@ subprojects {
3939
mockito_version = "2.23.4"
4040
handlebars_version = "4.0.5"
4141
jackson_version = "2.11.2"
42+
groovy_version = "3.0.5"
4243
}
4344

4445
repositories {

ngrinder-controller/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ dependencies {
7474
compile (group: "com.hazelcast", name: "hazelcast-spring", version: hazelcast_version)
7575
compile (group: "org.kohsuke", name: "github-api", version: "1.99")
7676
compile (group: "commons-validator", name: "commons-validator", version: "1.6")
77-
compile (group: 'org.codehaus.groovy', name: 'groovy-jsr223', version: '3.0.5')
77+
compile (group: 'org.codehaus.groovy', name: 'groovy-jsr223', version: groovy_version)
7878

7979
compileOnly (group: "org.projectlombok", name: "lombok", version: "1.18.8")
8080
annotationProcessor (group: "org.projectlombok", name: "lombok", version: "1.18.8")

ngrinder-controller/src/main/java/org/ngrinder/agent/service/AgentPackageService.java

+5-2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import static org.apache.commons.lang.StringUtils.isNotEmpty;
2323
import static org.ngrinder.common.util.CompressionUtils.*;
2424
import static org.ngrinder.common.util.EncodingUtils.decodePathWithUTF8;
25+
import static org.ngrinder.common.util.StringUtils.replaceLast;
2526

2627
/**
2728
* Agent package service.
@@ -125,11 +126,13 @@ public boolean isJar(File libFile) {
125126
* @param libs lib set
126127
* @return true if dependent lib
127128
*/
128-
private boolean isDependentLib(File libFile, Set<String> libs) {
129+
protected boolean isDependentLib(File libFile, Set<String> libs) {
129130
if (libFile.getName().contains("grinder-3.9.1.jar")) {
130131
return false;
131132
}
132-
String name = libFile.getName().replace("-SNAPSHOT", "").replace("-GA", "");
133+
134+
// Replace release types (-SNAPSHOT, -GA, -p1, ...)
135+
String name = replaceLast(libFile.getName(), "-[a-zA-Z][a-zA-Z1-9]+\\.", ".");
133136
final int libVersionStartIndex = name.lastIndexOf("-");
134137
name = name.substring(0, (libVersionStartIndex == -1) ? name.lastIndexOf(".") : libVersionStartIndex);
135138
return libs.contains(name);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/*
2+
* Copyright (c) 2012-present NAVER Corp.
3+
*
4+
* This file is part of The nGrinder software distribution. Refer to
5+
* the file LICENSE which is part of The nGrinder distribution for
6+
* licensing details. The nGrinder distribution is available on the
7+
* Internet at https://naver.github.io/ngrinder
8+
*
9+
* Licensed under the Apache License, Version 2.0 (the "License");
10+
* you may not use this file except in compliance with the License.
11+
* You may obtain a copy of the License at
12+
*
13+
* http://www.apache.org/licenses/LICENSE-2.0
14+
*
15+
* Unless required by applicable law or agreed to in writing, software
16+
* distributed under the License is distributed on an "AS IS" BASIS,
17+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18+
* See the License for the specific language governing permissions and
19+
* limitations under the License.
20+
*/
21+
package org.ngrinder.common.util;
22+
23+
/**
24+
* String utility.
25+
*
26+
* @since 3.5.1-p1
27+
*/
28+
public class StringUtils {
29+
30+
public static String replaceLast(String str, String regex, String replacement) {
31+
return str.replaceFirst("(?s)(.*)" + regex, "$1" + replacement);
32+
}
33+
}

ngrinder-controller/src/main/resources/application.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
ngrinder:
2-
version: 3.5.1
2+
version: 3.5.1-p1
33

44
server:
55
default-encoding: UTF-8

ngrinder-controller/src/main/resources/script_template/groovy_maven/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<version>0.0.1</version>
77

88
<properties>
9-
<ngrinder.version>3.5.1</ngrinder.version>
9+
<ngrinder.version>3.5.1-p1</ngrinder.version>
1010
<maven.compiler.source>1.8</maven.compiler.source>
1111
<maven.compiler.target>1.8</maven.compiler.target>
1212
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
package org.ngrinder.agent.service;
2+
3+
import org.junit.Test;
4+
import org.ngrinder.AbstractNGrinderTransactionalTest;
5+
import org.springframework.beans.factory.annotation.Autowired;
6+
7+
import java.io.File;
8+
import java.util.HashSet;
9+
import java.util.Set;
10+
11+
import static org.junit.Assert.assertFalse;
12+
import static org.junit.Assert.assertTrue;
13+
14+
public class AgentPackageServiceTest extends AbstractNGrinderTransactionalTest {
15+
16+
@Autowired
17+
private AgentPackageService agentPackageService;
18+
19+
@Test
20+
public void testIsDependentLib() {
21+
Set<String> libs = new HashSet<>();
22+
libs.add("ngrinder-groovy");
23+
libs.add("ngrinder-core");
24+
libs.add("ngrinder-runtime");
25+
libs.add("javassist");
26+
libs.add("jna");
27+
libs.add("jboss-transaction-api_1.2_spec");
28+
29+
assertTrue(agentPackageService.isDependentLib(new File("ngrinder-core-3.5.1-SNAPSHOT.jar"), libs));
30+
assertTrue(agentPackageService.isDependentLib(new File("ngrinder-groovy-3.5.1.jar"), libs));
31+
assertTrue(agentPackageService.isDependentLib(new File("ngrinder-runtime-3.5.1-p4.jar"), libs));
32+
assertTrue(agentPackageService.isDependentLib(new File("javassist-3.24.0-GA.jar"), libs));
33+
assertTrue(agentPackageService.isDependentLib(new File("jna-5.6.0.jar"), libs));
34+
assertTrue(agentPackageService.isDependentLib(new File("jboss-transaction-api_1.2_spec-1.1.1.Final.jar"), libs));
35+
36+
assertFalse(agentPackageService.isDependentLib(new File("jcommander-1.32.jar"), libs));
37+
assertFalse(agentPackageService.isDependentLib(new File("commons-collections-3.2.1.jar"), libs));
38+
}
39+
40+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package org.ngrinder.common.util;
2+
3+
import org.junit.Test;
4+
5+
import static org.hamcrest.Matchers.is;
6+
import static org.hamcrest.MatcherAssert.assertThat;
7+
import static org.ngrinder.common.util.StringUtils.replaceLast;
8+
9+
public class StringUtilsTest {
10+
11+
@Test
12+
public void testReplaceLast() {
13+
String str1 = "ngrinder-core-3.5.1-p1.jar";
14+
assertThat(replaceLast(str1, "-p[1-9]", ""), is("ngrinder-core-3.5.1.jar"));
15+
16+
String str2 = "ngrin-p2der-c-p3ore-3.5.1-p1.jar";
17+
assertThat(replaceLast(str2, "-p[1-9]", ""), is("ngrin-p2der-c-p3ore-3.5.1.jar"));
18+
19+
String str3 = "ngr-pginder-core-3.5.1-p0.jar";
20+
assertThat(replaceLast(str3, "-p[1-9]", ""), is("ngr-pginder-core-3.5.1-p0.jar"));
21+
}
22+
}

ngrinder-frontend/package.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
{
22
"name": "ngrinder",
3-
"version": "3.5.1",
3+
"version": "3.5.1-p1",
44
"description": "ngrinder GUI",
55
"private": true,
66
"repository": {
77
"type": "git",
88
"url": "https://github.com/naver/ngrinder.git"
99
},
1010
"scripts": {
11-
"build-dev": "webpack",
12-
"build-prod": "webpack --p",
13-
"watch-dev": "webpack --watch",
14-
"watch-prod": "webpack --watch --p",
11+
"build-dev": "webpack --d",
12+
"build-prod": "webpack",
13+
"watch-dev": "webpack --watch --d",
14+
"watch-prod": "webpack --watch",
1515
"test": "echo \"Error: no test specified\" && exit 1"
1616
},
1717
"author": "",

ngrinder-frontend/webpack.config.js

+10-10
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ var webpack = require('webpack');
66
var outputDir = path.resolve('../ngrinder-controller/build/classes/main/static');
77

88
var argv = require('yargs').argv;
9-
var productionBuild = argv.p || argv.prod || argv.production || false;
9+
var developmentBuild = argv.d || argv.dev || argv.development || false;
1010

11-
if (productionBuild) {
12-
console.log('### production build is enabled. ga is included and javascript is optimized\r');
13-
} else {
11+
if (developmentBuild) {
1412
console.log('### production build is disabled.\r');
13+
} else {
14+
console.log('### production build is enabled. ga is included and javascript is optimized\r');
1515
}
1616

1717
if (argv.w || argv.watch) {
@@ -23,26 +23,26 @@ console.log('### passed env is ' + JSON.stringify(argv.env));
2323
var cssLoader = {
2424
loader: 'css-loader',
2525
options: {
26-
sourceMap: !productionBuild,
26+
sourceMap: developmentBuild,
2727
},
2828
};
2929

3030
var lessLoader = {
3131
loader: 'less-loader',
3232
options: {
33-
sourceMap: !productionBuild,
33+
sourceMap: developmentBuild,
3434
},
3535
};
3636

3737
module.exports = function (env) {
38-
var ngrinderVersion = '3.5.1';
38+
var ngrinderVersion = '3.5.1-p1';
3939
if (env !== undefined && env.ngrinderVersion !== undefined) {
4040
ngrinderVersion = env.ngrinderVersion;
4141
}
4242
console.log('### frontend version is ' + ngrinderVersion + '\r');
4343

4444
var webpackConfig = {
45-
mode: productionBuild ? 'production' : 'development',
45+
mode: developmentBuild ? 'development' : 'production',
4646
performance: {
4747
hints: false,
4848
},
@@ -166,7 +166,7 @@ module.exports = function (env) {
166166
},
167167
]),
168168
new webpack.LoaderOptionsPlugin({
169-
debug: !productionBuild,
169+
debug: developmentBuild,
170170
options: {
171171
context: __dirname,
172172
htmlLoader: {
@@ -180,7 +180,7 @@ module.exports = function (env) {
180180
],
181181
};
182182

183-
if (!productionBuild) {
183+
if (developmentBuild) {
184184
console.log('### sourcemap is enabled.\r');
185185
webpackConfig.devtool = "#inline-source-map";
186186
} else {

ngrinder-groovy/build.gradle

+6-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,12 @@ configurations {
88

99
dependencies {
1010
compile (project(":ngrinder-runtime"))
11-
compile (group: "org.codehaus.groovy", name: "groovy", version:"3.0.5")
11+
compile (group: "org.codehaus.groovy", name: "groovy", version: groovy_version)
12+
compile (group: 'org.codehaus.groovy', name: 'groovy-datetime', version: groovy_version)
13+
compile (group: 'org.codehaus.groovy', name: 'groovy-templates', version: groovy_version)
14+
compile (group: 'org.codehaus.groovy', name: 'groovy-json', version: groovy_version)
15+
compile (group: 'org.codehaus.groovy', name: 'groovy-sql', version: groovy_version)
16+
compile (group: 'org.codehaus.groovy', name: 'groovy-xml', version: groovy_version)
1217

1318
testCompile (group: "org.mockito", name: "mockito-core", version: mockito_version)
1419

0 commit comments

Comments
 (0)