Skip to content

Commit f738863

Browse files
Consolidate Factory CI behaviour test jobs per driver language (#587)
## Usage and product changes We merge individual `test-{lang}-behaviour-{domain}` jobs in FactoryCI into a single `test-{lang}-behaviour` job in order to reduce CI bootup and shutdown overhead per test. We also fix mac-x86_64 Python and maven deployment tests by explicitly enforcing the use of Rosetta. ## Implementation Drive-by: in NodeJS driver, session pulse no longer attempts to close the already closed session if `isAlive` comes back `false`. Instead we extract the `closeResources()` method which executes all callbacks and cleans up the driver's session handle.
1 parent 4e707f2 commit f738863

File tree

3 files changed

+183
-881
lines changed

3 files changed

+183
-881
lines changed

.circleci/config.yml

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ commands:
9494
sudo mv "bazelisk-darwin-<<parameters.bazel-arch>>" /usr/local/bin/bazel
9595
chmod a+x /usr/local/bin/bazel
9696
97+
install-brew-rosetta:
98+
steps:
99+
- run: arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
100+
97101
###########################
98102
# Python deployment steps #
99103
###########################
@@ -129,6 +133,23 @@ commands:
129133
tool/test/stop-core-server.sh
130134
exit $TEST_SUCCESS
131135
136+
test-pip-snapshot-mac-rosetta:
137+
steps:
138+
- install-brew-rosetta
139+
- run: |
140+
/usr/local/bin/brew install [email protected]
141+
tool/test/start-core-server.sh
142+
/usr/local/bin/python3.8 -m pip install wheel
143+
/usr/local/bin/python3.8 -m pip install pip==21.3.1
144+
/usr/local/bin/python3.8 -m pip install -r python/requirements_dev.txt
145+
/usr/local/bin/python3.8 -m pip install --extra-index-url https://repo.typedb.com/public/public-snapshot/python/simple typedb-driver==0.0.0+$(git rev-parse HEAD)
146+
sleep 3
147+
pushd python/tests/deployment/
148+
/usr/local/bin/python3.8 -m unittest test && export TEST_SUCCESS=0 || export TEST_SUCCESS=1
149+
popd
150+
tool/test/stop-core-server.sh
151+
exit $TEST_SUCCESS
152+
132153
deploy-pip-release-unix:
133154
steps:
134155
- install-pip-requirements
@@ -149,6 +170,11 @@ commands:
149170
steps:
150171
- run: brew install maven
151172

173+
install-maven-mac-rosetta:
174+
steps:
175+
- install-brew-rosetta
176+
- run: /usr/local/bin/brew install maven
177+
152178
install-maven-linux:
153179
steps:
154180
- run: yum install -y maven
@@ -176,6 +202,15 @@ commands:
176202
(cd java/test/deployment && mvn test)
177203
tool/test/stop-core-server.sh
178204
205+
test-maven-snapshot-mac-rosetta:
206+
steps:
207+
- run: |
208+
tool/test/start-core-server.sh
209+
sed -i -e "s/DRIVER_JAVA_VERSION_MARKER/0.0.0-$CIRCLE_SHA1/g" java/test/deployment/pom.xml
210+
cat java/test/deployment/pom.xml
211+
(cd java/test/deployment && /usr/local/bin/mvn test)
212+
tool/test/stop-core-server.sh
213+
179214
deploy-maven-jni-release-unix:
180215
steps:
181216
- run: |
@@ -529,9 +564,9 @@ jobs:
529564
- checkout
530565
- install-bazel-brew:
531566
bazel-arch: amd64
532-
- test-pip-snapshot-unix
533-
- install-maven-mac
534-
- test-maven-snapshot-unix
567+
- test-pip-snapshot-mac-rosetta
568+
- install-maven-mac-rosetta
569+
- test-maven-snapshot-mac-rosetta
535570

536571
test-snapshot-windows-x86_64:
537572
executor:

0 commit comments

Comments
 (0)