Merged in feature/ecr (pull request #159)
Test * tests * tar * go * tmp * test * go * go * go * config * goup * versioning * order * cleanup * git * smallopts * flags * lessisgood * go * order * ordermatters * order * cc * test
This commit is contained in:
+51
-27
@@ -38,7 +38,7 @@ func TestProcess(t *testing.T) {
|
||||
var jsonId queryapi.QueryID
|
||||
var textractExpectation test.MockExpectation
|
||||
textractBody := "Hello World"
|
||||
wg.Add(3)
|
||||
wg.Add(2)
|
||||
go func(t testing.TB) {
|
||||
_, jsonId = queryapitest.CreateDependentQueries(t, net.Client)
|
||||
wg.Done()
|
||||
@@ -47,6 +47,10 @@ func TestProcess(t *testing.T) {
|
||||
clientId = queryapitest.CreateClientWithSync(t, net.Client)
|
||||
wg.Done()
|
||||
}(t)
|
||||
|
||||
wg.Wait()
|
||||
|
||||
wg.Add(3)
|
||||
go func(t testing.TB) {
|
||||
textractExpectation = test.CreateDetectDocumentTextExpectation(
|
||||
t,
|
||||
@@ -55,17 +59,21 @@ func TestProcess(t *testing.T) {
|
||||
)
|
||||
wg.Done()
|
||||
}(t)
|
||||
go func(t testing.TB) {
|
||||
queryapitest.SetQueryForClient(t, net.Client, clientId, jsonId)
|
||||
wg.Done()
|
||||
}(t)
|
||||
go func(t testing.TB) {
|
||||
queryapitest.CreateFile(t, net.Client, queryapitest.File{
|
||||
Filename: "helloworld.pdf",
|
||||
Content: []byte(pdfHelloWorld),
|
||||
ClientID: clientId,
|
||||
})
|
||||
wg.Done()
|
||||
}(t)
|
||||
|
||||
wg.Wait()
|
||||
|
||||
queryapitest.SetQueryForClient(t, net.Client, clientId, jsonId)
|
||||
|
||||
queryapitest.CreateFile(t, net.Client, queryapitest.File{
|
||||
Filename: "helloworld.pdf",
|
||||
Content: []byte(pdfHelloWorld),
|
||||
ClientID: clientId,
|
||||
})
|
||||
|
||||
test.WaitForMockEndpoint(t, net.Dependencies.MockServer, textractExpectation.Request)
|
||||
|
||||
part := uint16(0)
|
||||
@@ -117,7 +125,7 @@ func TestProcess(t *testing.T) {
|
||||
var jsonId queryapi.QueryID
|
||||
var textractExpectation test.MockExpectation
|
||||
textractBody := "Hello World"
|
||||
wg.Add(3)
|
||||
wg.Add(2)
|
||||
go func(t testing.TB) {
|
||||
_, jsonId = queryapitest.CreateDependentQueries(t, net.Client)
|
||||
wg.Done()
|
||||
@@ -126,6 +134,22 @@ func TestProcess(t *testing.T) {
|
||||
clientId = queryapitest.CreateClientWithSync(t, net.Client)
|
||||
wg.Done()
|
||||
}(t)
|
||||
|
||||
wg.Wait()
|
||||
|
||||
wg.Add(3)
|
||||
go func(t testing.TB) {
|
||||
queryapitest.SetQueryForClient(t, net.Client, clientId, jsonId)
|
||||
wg.Done()
|
||||
}(t)
|
||||
go func(t testing.TB) {
|
||||
queryapitest.CreateFile(t, net.Client, queryapitest.File{
|
||||
Filename: "helloworld.pdf",
|
||||
Content: []byte(pdfHelloWorld),
|
||||
ClientID: clientId,
|
||||
})
|
||||
wg.Done()
|
||||
}(t)
|
||||
go func(t testing.TB) {
|
||||
textractExpectation = test.CreateDetectDocumentTextExpectation(
|
||||
t,
|
||||
@@ -137,14 +161,6 @@ func TestProcess(t *testing.T) {
|
||||
|
||||
wg.Wait()
|
||||
|
||||
queryapitest.SetQueryForClient(t, net.Client, clientId, jsonId)
|
||||
|
||||
queryapitest.CreateFile(t, net.Client, queryapitest.File{
|
||||
Filename: "helloworld.pdf",
|
||||
Content: []byte(pdfHelloWorld),
|
||||
ClientID: clientId,
|
||||
})
|
||||
|
||||
test.WaitForMockEndpoint(t, net.Dependencies.MockServer, textractExpectation.Request)
|
||||
|
||||
queryapitest.WaitForClientStatus(t, t.Context(), net.Client, clientId, queryapi.INSYNC)
|
||||
@@ -191,7 +207,7 @@ func TestProcess(t *testing.T) {
|
||||
var jsonId queryapi.QueryID
|
||||
var textractExpectation test.MockExpectation
|
||||
textractBody := "Hello World"
|
||||
wg.Add(3)
|
||||
wg.Add(2)
|
||||
go func(t testing.TB) {
|
||||
_, jsonId = queryapitest.CreateDependentQueries(t, net.Client)
|
||||
|
||||
@@ -207,6 +223,10 @@ func TestProcess(t *testing.T) {
|
||||
clientId = queryapitest.CreateClientWithSync(t, net.Client)
|
||||
wg.Done()
|
||||
}(t)
|
||||
|
||||
wg.Wait()
|
||||
|
||||
wg.Add(3)
|
||||
go func(t testing.TB) {
|
||||
textractExpectation = test.CreateDetectDocumentTextExpectation(
|
||||
t,
|
||||
@@ -215,17 +235,21 @@ func TestProcess(t *testing.T) {
|
||||
)
|
||||
wg.Done()
|
||||
}(t)
|
||||
go func(t testing.TB) {
|
||||
queryapitest.SetQueryForClient(t, net.Client, clientId, jsonId)
|
||||
wg.Done()
|
||||
}(t)
|
||||
go func(t testing.TB) {
|
||||
queryapitest.CreateFile(t, net.Client, queryapitest.File{
|
||||
Filename: "helloworld.pdf",
|
||||
Content: []byte(pdfHelloWorld),
|
||||
ClientID: clientId,
|
||||
})
|
||||
wg.Done()
|
||||
}(t)
|
||||
|
||||
wg.Wait()
|
||||
|
||||
queryapitest.SetQueryForClient(t, net.Client, clientId, jsonId)
|
||||
|
||||
queryapitest.CreateFile(t, net.Client, queryapitest.File{
|
||||
Filename: "helloworld.pdf",
|
||||
Content: []byte(pdfHelloWorld),
|
||||
ClientID: clientId,
|
||||
})
|
||||
|
||||
test.WaitForMockEndpoint(t, net.Dependencies.MockServer, textractExpectation.Request)
|
||||
|
||||
queryapitest.WaitForClientStatus(t, t.Context(), net.Client, clientId, queryapi.INSYNC)
|
||||
|
||||
Reference in New Issue
Block a user