Skip to content

Commit 8d6c073

Browse files
Feature/parallel tests run in v2 (#721)
1 parent b9280bf commit 8d6c073

File tree

7 files changed

+363
-262
lines changed

7 files changed

+363
-262
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ ifndef VST_ENABLED
4040
VST_ENABLED := "false"
4141
endif
4242

43-
TESTV2PARALLEL ?= 1
43+
TESTV2PARALLEL ?= 4
4444

4545
ORGPATH := github.com/arangodb
4646
REPONAME := $(PROJECT)
@@ -417,6 +417,7 @@ COMMON_DOCKER_CMD_PARAMS = \
417417
$(TEST_NET) \
418418
-e TEST_ENDPOINTS=$(TEST_ENDPOINTS) \
419419
-e TEST_NOT_WAIT_UNTIL_READY=$(TEST_NOT_WAIT_UNTIL_READY) \
420+
-e TEST_AUTH=$(TEST_AUTH) \
420421
-e TEST_AUTHENTICATION=$(TEST_AUTHENTICATION) \
421422
-e TEST_JWTSECRET=$(TEST_JWTSECRET) \
422423
-e TEST_MODE=$(TEST_MODE) \

v2/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## [master](https://github.com/arangodb/go-driver/tree/master) (N/A)
44
- Add endpoint to fetch deployment id
55
- Add ARM Support for V2 testcases
6+
- Set TESTV2PARALLEL from 1 to 4
67

78
## [2.1.6](https://github.com/arangodb/go-driver/tree/v2.1.6) (2025-11-06)
89
- Add missing endpoints from replication

v2/arangodb/client_admin_impl.go

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,31 @@ func (c *clientAdmin) GetStartupConfiguration(ctx context.Context) (map[string]i
261261
case http.StatusOK:
262262
return response, nil
263263
default:
264+
// Try to extract error details from the response map
265+
// ArangoDB error responses include: error, code, errorNum, errorMessage
266+
if errorVal, hasError := response["error"]; hasError {
267+
if errorBool, ok := errorVal.(bool); ok && errorBool {
268+
// This is an error response, extract error details
269+
errorStruct := shared.ResponseStruct{}
270+
if codeVal, ok := response["code"].(float64); ok {
271+
codeInt := int(codeVal)
272+
errorStruct.Code = &codeInt
273+
}
274+
if errorNumVal, ok := response["errorNum"].(float64); ok {
275+
errorNumInt := int(errorNumVal)
276+
errorStruct.ErrorNum = &errorNumInt
277+
}
278+
if errorMsgVal, ok := response["errorMessage"].(string); ok {
279+
errorStruct.ErrorMessage = &errorMsgVal
280+
}
281+
if errorStruct.Code != nil || errorStruct.ErrorNum != nil || errorStruct.ErrorMessage != nil {
282+
errorBool := true
283+
errorStruct.Error = &errorBool
284+
return nil, errorStruct.AsArangoError()
285+
}
286+
}
287+
}
288+
// Fallback to code-only error if we couldn't parse error details
264289
return nil, (&shared.ResponseStruct{}).AsArangoErrorWithCode(code)
265290
}
266291
}
@@ -281,6 +306,31 @@ func (c *clientAdmin) GetStartupConfigurationDescription(ctx context.Context) (m
281306
case http.StatusOK:
282307
return response, nil
283308
default:
309+
// Try to extract error details from the response map
310+
// ArangoDB error responses include: error, code, errorNum, errorMessage
311+
if errorVal, hasError := response["error"]; hasError {
312+
if errorBool, ok := errorVal.(bool); ok && errorBool {
313+
// This is an error response, extract error details
314+
errorStruct := shared.ResponseStruct{}
315+
if codeVal, ok := response["code"].(float64); ok {
316+
codeInt := int(codeVal)
317+
errorStruct.Code = &codeInt
318+
}
319+
if errorNumVal, ok := response["errorNum"].(float64); ok {
320+
errorNumInt := int(errorNumVal)
321+
errorStruct.ErrorNum = &errorNumInt
322+
}
323+
if errorMsgVal, ok := response["errorMessage"].(string); ok {
324+
errorStruct.ErrorMessage = &errorMsgVal
325+
}
326+
if errorStruct.Code != nil || errorStruct.ErrorNum != nil || errorStruct.ErrorMessage != nil {
327+
errorBool := true
328+
errorStruct.Error = &errorBool
329+
return nil, errorStruct.AsArangoError()
330+
}
331+
}
332+
}
333+
// Fallback to code-only error if we couldn't parse error details
284334
return nil, (&shared.ResponseStruct{}).AsArangoErrorWithCode(code)
285335
}
286336
}

0 commit comments

Comments
 (0)