Skip to content

Commit 24eaeb6

Browse files
authored
fix: change type of primary key for segment_version to bigint (#39)
1 parent 140db4a commit 24eaeb6

File tree

8 files changed

+140
-16
lines changed

8 files changed

+140
-16
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ jobs:
2121
distribution: 'temurin'
2222
cache: maven
2323
- name: Build with Maven
24-
run: mvn -B package --file pom.xml
24+
run: mvn -B verify --file pom.xml
2525
- name: Upload coverage reports to Codecov with GitHub Action
2626
uses: codecov/codecov-action@v2

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
output
2-
/target/
2+
**/target/
33
/logs/
44
*.iml
55
.arcconfig
66
.idea
77
.settings
88
.classpath
99
.project
10-
*.iml
1110
pom.xml.versionsBackup
1211
.java-version
1312
.DS_Store
1413
*.tar.gz
14+
*.log

feature-probe-admin/pom.xml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,70 @@
199199
</dependency>
200200
</dependencies>
201201
</plugin>
202+
203+
<plugin>
204+
<groupId>org.apache.maven.plugins</groupId>
205+
<artifactId>maven-failsafe-plugin</artifactId>
206+
<version>3.0.0-M4</version>
207+
<executions>
208+
<execution>
209+
<goals>
210+
<goal>integration-test</goal>
211+
<goal>verify</goal>
212+
</goals>
213+
</execution>
214+
</executions>
215+
</plugin>
216+
<plugin>
217+
<groupId>io.fabric8</groupId>
218+
<artifactId>docker-maven-plugin</artifactId>
219+
<version>0.40.2</version>
220+
<extensions>true</extensions>
221+
<executions>
222+
<execution>
223+
<id>pre-integration-test</id>
224+
<goals>
225+
<goal>build</goal>
226+
<goal>start</goal>
227+
</goals>
228+
<configuration>
229+
<images>
230+
<image>
231+
<name>featureprobe-api-it</name>
232+
<external>
233+
<type>compose</type>
234+
<basedir>src/test/resources</basedir>
235+
<composeFile>it/docker/docker-compose.yml</composeFile>
236+
</external>
237+
<run>
238+
<wait>
239+
<log>.*mariadb\.org binary distribution.*</log>
240+
<time>60000</time>
241+
</wait>
242+
</run>
243+
</image>
244+
</images>
245+
</configuration>
246+
</execution>
247+
<execution>
248+
<id>post-integration-test</id>
249+
<goals>
250+
<goal>stop</goal>
251+
</goals>
252+
<configuration>
253+
<images>
254+
<image>
255+
<name>featureprobe-api-it</name>
256+
<watch>
257+
<interval>2000</interval>
258+
</watch>
259+
</image>
260+
</images>
261+
</configuration>
262+
</execution>
263+
</executions>
264+
</plugin>
265+
202266
</plugins>
203267

204268

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ALTER TABLE segment_version
2+
MODIFY id bigint;
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package com.featureprobe.api;
2+
3+
import static org.assertj.core.api.Assertions.assertThat;
4+
5+
import org.junit.jupiter.api.Test;
6+
import org.springframework.beans.factory.annotation.Autowired;
7+
import org.springframework.boot.test.context.SpringBootTest;
8+
import org.springframework.context.ApplicationContext;
9+
import org.springframework.test.context.ActiveProfiles;
10+
11+
@SpringBootTest(classes = Application.class)
12+
@ActiveProfiles({"it"})
13+
class ApplicationIT {
14+
15+
@Autowired
16+
ApplicationContext ctx;
17+
18+
@Test
19+
void contextLoads() {
20+
assertThat(ctx).isNotNull();
21+
}
22+
}

feature-probe-admin/src/test/groovy/com/featureprobe/api/ApplicationTests.groovy

Lines changed: 0 additions & 13 deletions
This file was deleted.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
spring:
2+
datasource:
3+
driver-class-name: com.mysql.cj.jdbc.Driver
4+
jdbc-url: jdbc:mysql://127.0.0.1:13308/feature_probe?useUnicode=true&characterEncoding=utf8&autoReconnect=true&failOverReadOnly=false&rewriteBatchedStatements=TRUE&useSSL=false&serverTimezone=Asia/Shanghai
5+
username: root
6+
password: root
7+
8+
jpa:
9+
hibernate:
10+
ddl-auto: validate
11+
properties:
12+
hibernate:
13+
dialect: org.hibernate.dialect.MySQL57InnoDBDialect
14+
15+
flyway:
16+
enabled: true
17+
clean-disabled: true
18+
table: flyway_schema_history
19+
20+
app:
21+
toggle-deadline: 30
22+
server-data-source: MEMORY # DB
23+
security:
24+
jwt:
25+
keystore-location: keys/keystore.jks
26+
keystore-password: password
27+
key-alias: jwtsigning
28+
private-key-passphrase: password
29+
exclude-tenant-uri:
30+
- /api/server/toggles
31+
- /api/server/sdk_keys
32+
- /api/server/events
33+
- /api/v3/api-docs.yaml
34+
- /api/actuator/health
35+
guest-disabled: true
36+
guest-default-password: Guest_12345
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# database integration test
2+
3+
version: "2.3"
4+
5+
services:
6+
database:
7+
image: mariadb:10.5.8
8+
ports:
9+
- "13308:13308"
10+
environment:
11+
- MYSQL_ROOT_PASSWORD=root
12+
- MYSQL_DATABASE=feature_probe
13+
- MYSQL_TCP_PORT=13308

0 commit comments

Comments
 (0)