From 357b9e3576eaf328bf8227e41acb4ce5b6121898 Mon Sep 17 00:00:00 2001 From: zhanghongtong Date: Thu, 16 Apr 2020 14:41:08 +0800 Subject: [PATCH 1/2] Update script for check jemter log --- .github/workflows/run_fvt_tests.yaml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/run_fvt_tests.yaml b/.github/workflows/run_fvt_tests.yaml index b04ca1e00b..bed8fa047d 100644 --- a/.github/workflows/run_fvt_tests.yaml +++ b/.github/workflows/run_fvt_tests.yaml @@ -64,7 +64,8 @@ jobs: run: | sudo apt update && sudo apt install -y libxml2-utils cd jmeter_logs - if [ "$(xmllint --format --xpath '/testResults/sample/@rc' $(ls *.jtl) | sed -r 's/ /\n/g;' | sort -u | grep -E 'rc=\"[45][0-9][0-9]\"|rc=\"\"')" != "" ]; then + if [ ! -z "$(cat *.jtl| grep '' | awk -F '>' '{print $2}' | awk -F '<' '{print $1}' | grep true)" ] || + [ "$(xmllint --format --xpath '/testResults/sample/@rc' $(ls *.jtl) | sed -r 's/ /\n/g;' | sort -u | grep -E 'rc=\"[45][0-9][0-9]\"|rc=\"\"')" != "" ]; then echo -e "---------------------------------------------\n" echo "FVT tests error" exit 1 @@ -125,7 +126,8 @@ jobs: run: | sudo apt update && sudo apt install -y libxml2-utils cd jmeter_logs - if [ "$(xmllint --format --xpath '/testResults/sample/@rc' $(ls *.jtl) | sed -r 's/ /\n/g;' | sort -u | grep -E 'rc=\"[45][0-9][0-9]\"|rc=\"\"')" != "" ]; then + if [ ! -z "$(cat *.jtl| grep '' | awk -F '>' '{print $2}' | awk -F '<' '{print $1}' | grep true)" ] || + [ "$(xmllint --format --xpath '/testResults/sample/@rc' $(ls *.jtl) | sed -r 's/ /\n/g;' | sort -u | grep -E 'rc=\"[45][0-9][0-9]\"|rc=\"\"')" != "" ]; then echo -e "---------------------------------------------\n" echo "FVT tests error" exit 1 @@ -246,7 +248,8 @@ jobs: run: | sudo apt update && sudo apt install -y libxml2-utils cd jmeter_logs - if [ "$(xmllint --format --xpath '/testResults/sample/@rc' $(ls *.jtl) | sed -r 's/ /\n/g;' | sort -u | grep -E 'rc=\"[45][0-9][0-9]\"|rc=\"\"')" != "" ]; then + if [ ! -z "$(cat *.jtl| grep '' | awk -F '>' '{print $2}' | awk -F '<' '{print $1}' | grep true)" ] || + [ "$(xmllint --format --xpath '/testResults/sample/@rc' $(ls *.jtl) | sed -r 's/ /\n/g;' | sort -u | grep -E 'rc=\"[45][0-9][0-9]\"|rc=\"\"')" != "" ]; then echo -e "---------------------------------------------\n" echo "FVT tests error" exit 1 From aa137b112e8365aa06dff9fc4b14724d0a0ff8b9 Mon Sep 17 00:00:00 2001 From: RockyJin Date: Thu, 16 Apr 2020 17:25:37 +0800 Subject: [PATCH 2/2] skip binary type processing --- xstream/extensions/edgex_source.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xstream/extensions/edgex_source.go b/xstream/extensions/edgex_source.go index a22b21cf40..a38d95dc6c 100644 --- a/xstream/extensions/edgex_source.go +++ b/xstream/extensions/edgex_source.go @@ -192,6 +192,8 @@ func (es *EdgexSource) getValue(r models.Reading, logger api.Logger) (interface{ } case "STRING": return v, nil + case "BINARY": + return nil, fmt.Errorf("Unsupport for binary type, the value will be ignored.") default: logger.Warnf("unknown type %s return the string value", t) return v, nil