Class: Google::Apis::TestingV1::UniformSharding

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/testing_v1/classes.rb,
lib/google/apis/testing_v1/representations.rb,
lib/google/apis/testing_v1/representations.rb

Overview

Uniformly shards test cases given a total number of shards. For Instrumentation test, it will be translated to "-e numShard" "-e shardIndex" AndroidJUnitRunner arguments. Based on the sharding mechanism AndroidJUnitRunner uses, there is no guarantee that test cases will be distributed uniformly across all shards. With uniform sharding enabled, specifying these sharding arguments via environment_variables is invalid.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ UniformSharding

Returns a new instance of UniformSharding.



2611
2612
2613
# File 'lib/google/apis/testing_v1/classes.rb', line 2611

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#num_shardsFixnum

Required. Total number of shards. When any physical devices are selected, the number must be >= 1 and <= 50. When no physical devices are selected, the number must be >= 1 and <= 500. Corresponds to the JSON property numShards

Returns:

  • (Fixnum)


2609
2610
2611
# File 'lib/google/apis/testing_v1/classes.rb', line 2609

def num_shards
  @num_shards
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2616
2617
2618
# File 'lib/google/apis/testing_v1/classes.rb', line 2616

def update!(**args)
  @num_shards = args[:num_shards] if args.key?(:num_shards)
end