alfraser commited on
Commit
4332953
·
1 Parent(s): c76e6f5

Fixed a bug where if the architecture had entirely failed and not generated a response the whole load of TestGroups would crash. Need to fix the root cause of the failure to generate a response, but also should be caught gracefully here in any event.

Browse files
Files changed (1) hide show
  1. src/testing.py +4 -1
src/testing.py CHANGED
@@ -82,7 +82,10 @@ class ArchitectureRequestRecord:
82
  @classmethod
83
  def from_dict(cls, test: Dict) -> ArchitectureRequestRecord:
84
  arch = test['architecture']
85
- response_len = len(test['request']['response_evolution'][-1])
 
 
 
86
  start = test['trace']['steps'][0]['start_ms']
87
  end = test['trace']['steps'][-1]['end_ms']
88
  elapsed = end - start
 
82
  @classmethod
83
  def from_dict(cls, test: Dict) -> ArchitectureRequestRecord:
84
  arch = test['architecture']
85
+ if len(test['request']['response_evolution']) == 0:
86
+ response_len = 0
87
+ else:
88
+ response_len = len(test['request']['response_evolution'][-1])
89
  start = test['trace']['steps'][0]['start_ms']
90
  end = test['trace']['steps'][-1]['end_ms']
91
  elapsed = end - start