forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bedrock streaming integration testing #14
Merged
stephmilovic
merged 9 commits into
bedrock_streaming
from
bedrock_streaming_integration_testing
Nov 15, 2023
Merged
Bedrock streaming integration testing #14
stephmilovic
merged 9 commits into
bedrock_streaming
from
bedrock_streaming_integration_testing
Nov 15, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stephmilovic
commented
Nov 14, 2023
|
||
passThrough.on('data', (chunk) => { | ||
// logs the state of the stream, but not the stream itself | ||
console.log('passThrough.data???', chunk.toString()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only returns the state of the stream, not the stream itself
passThrough.data??? {
"status":"ok",
"data":{
"_readableState":{
"objectMode":false,
"highWaterMark":16384,
"buffer":{
"head":null,
"tail":null,
"length":0
},
"length":0,
"pipes":[
{
"_readableState":{
"objectMode":false,
"highWaterMark":16384,
"buffer":{
"head":null,
"tail":null,
"length":0
},
"length":0,
"pipes":[
],
"flowing":true,
"ended":false,
"endEmitted":false,
"reading":false,
"constructed":true,
"sync":false,
"needReadable":false,
"emittedReadable":false,
"readableListening":false,
"resumeScheduled":true,
"errorEmitted":false,
"emitClose":true,
"autoDestroy":true,
"destroyed":false,
"errored":null,
"closed":false,
"closeEmitted":false,
"defaultEncoding":"utf8",
"awaitDrainWriters":null,
"multiAwaitDrain":false,
"readingMore":false,
"dataEmitted":false,
"decoder":null,
"encoding":null
},
"_events":{
"error":[
null,
null
],
"close":[
null,
null
],
"finish":[
null,
null
]
},
"_eventsCount":7,
"_writableState":{
"objectMode":false,
"highWaterMark":16384,
"finalCalled":false,
"needDrain":false,
"ending":false,
"ended":false,
"finished":false,
"destroyed":false,
"decodeStrings":true,
"defaultEncoding":"utf8",
"length":0,
"writing":false,
"corked":0,
"sync":true,
"bufferProcessing":false,
"writecb":null,
"writelen":0,
"afterWriteTickInfo":null,
"buffered":[
],
"bufferedIndex":0,
"allBuffers":true,
"allNoop":true,
"pendingcb":0,
"constructed":true,
"prefinished":false,
"errorEmitted":false,
"emitClose":true,
"autoDestroy":true,
"errored":null,
"closed":false,
"closeEmitted":false
},
"allowHalfOpen":true
}
],
"flowing":true,
"ended":false,
"endEmitted":false,
"reading":false,
"constructed":true,
"sync":false,
"needReadable":false,
"emittedReadable":false,
"readableListening":false,
"resumeScheduled":true,
"errorEmitted":false,
"emitClose":true,
"autoDestroy":true,
"destroyed":false,
"errored":null,
"closed":false,
"closeEmitted":false,
"defaultEncoding":"utf8",
"awaitDrainWriters":null,
"multiAwaitDrain":false,
"readingMore":false,
"dataEmitted":false,
"decoder":null,
"encoding":null
},
"_events":{
},
"_eventsCount":7,
"_writableState":{
"objectMode":false,
"highWaterMark":16384,
"finalCalled":false,
"needDrain":false,
"ending":false,
"ended":false,
"finished":false,
"destroyed":false,
"decodeStrings":true,
"defaultEncoding":"utf8",
"length":0,
"writing":false,
"corked":0,
"sync":true,
"bufferProcessing":false,
"writecb":null,
"writelen":0,
"afterWriteTickInfo":null,
"buffered":[
],
"bufferedIndex":0,
"allBuffers":true,
"allNoop":true,
"pendingcb":0,
"constructed":true,
"prefinished":false,
"errorEmitted":false,
"emitClose":true,
"autoDestroy":true,
"errored":null,
"closed":false,
"closeEmitted":false
},
"allowHalfOpen":true
},
"connector_id":"c76a64e3-7382-4f83-a525-703f3f0ad6d2"
}
This is what the response looks like logged in real life:
{
status: 'ok',
data: Transform {
_readableState: ReadableState {
objectMode: false,
highWaterMark: 16384,
buffer: BufferList { head: null, tail: null, length: 0 },
length: 0,
pipes: [Array],
flowing: true,
ended: false,
endEmitted: false,
reading: false,
constructed: true,
sync: false,
needReadable: false,
emittedReadable: false,
readableListening: false,
resumeScheduled: true,
errorEmitted: false,
emitClose: true,
autoDestroy: true,
destroyed: false,
errored: null,
closed: false,
closeEmitted: false,
defaultEncoding: 'utf8',
awaitDrainWriters: null,
multiAwaitDrain: false,
readingMore: false,
dataEmitted: false,
decoder: null,
encoding: null,
[Symbol(kPaused)]: false
},
_events: [Object: null prototype] {
prefinish: [Function: prefinish],
unpipe: [Function: onunpipe],
error: [Function: onerror],
close: [Function],
finish: [Function],
end: [Function],
data: [Function: ondata]
},
_eventsCount: 7,
_maxListeners: undefined,
_writableState: WritableState {
objectMode: false,
highWaterMark: 16384,
finalCalled: false,
needDrain: false,
ending: false,
ended: false,
finished: false,
destroyed: false,
decodeStrings: true,
defaultEncoding: 'utf8',
length: 0,
writing: false,
corked: 0,
sync: true,
bufferProcessing: false,
onwrite: [Function: bound onwrite],
writecb: null,
writelen: 0,
afterWriteTickInfo: null,
buffered: [],
bufferedIndex: 0,
allBuffers: true,
allNoop: true,
pendingcb: 0,
constructed: true,
prefinished: false,
errorEmitted: false,
emitClose: true,
autoDestroy: true,
errored: null,
closed: false,
closeEmitted: false,
[Symbol(kOnFinished)]: []
},
allowHalfOpen: true,
_transform: [Function: transform],
[Symbol(kCapture)]: false,
[Symbol(kCallback)]: null
},
actionId: '337fc345-352e-459f-8c2c-817604ad14bd'
}
As you can see, on my real server, I get a Transform. On supertest
, i get only the state of the Tranform
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
WIP